Affiliate Marketing
Forum Search

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 29-10-04
Registered User
 
Join Date: Jun 2004
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
amcd78 is an unknown quantity at this point
  Question URL Rewriting

Hi

We're looking of implementing a URL rewriting funciton on our site, however, we are currently hosted on shared servers, and are therefore not able to install any objects or filters.

We are hosted on a .Net server, therefore does this seem a feasible option: http://msdn.microsoft.com/library/de...lrewriting.asp

Is there a better option, I should be looking at instead?

Enjoy your weekend
Alastair
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 29-10-04
Retail-Therapy's Avatar
Can't Touch This
 
Join Date: May 2004
Location: КРОМИДОВО
Posts: 318
Thanks: 1
Thanked 0 Times in 0 Posts
Retail-Therapy is an unknown quantity at this point
Alastair if you can't install anything on the server, the microsoft article is about building your own isapi url rewriting filter, so is no good to you.

Theres no way round it if you can't install a filter.

If you can (I have requested hosting companies to install filters and they have), then there are two extremely robust possibilities, both from Helicontech Isapi_Rewrite and LinkFreeze

The best thing to do is, move hosts, get Apache and Linux with rewriting enabled, its all plain sailing (-ish) from there.

Tony
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 29-10-04
Barry's Avatar
Typing with both fingers.
 
Join Date: Aug 2003
Location: In Fishguard with my lovely coracle.
Posts: 2,978
Thanks: 114
Thanked 24 Times in 18 Posts
Barry seems to know their stuff
Do you have access to changing the location of the 404 page?

If so you 'may' (depending on how the server is set up) be able to write your own url rewriting script.
__________________
Mirror Ten Ltd :: Free Codes :: HTC Touch HD
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 29-10-04
Retail-Therapy's Avatar
Can't Touch This
 
Join Date: May 2004
Location: КРОМИДОВО
Posts: 318
Thanks: 1
Thanked 0 Times in 0 Posts
Retail-Therapy is an unknown quantity at this point
url rewriting based around a 404 is probably not a good thing to do, its a 'page not found' error code, so the url rewriting (unless its not for SE purposes) won't get you anywhere. The 404 header will have been set by IIS before the custom error page displays.

Tony
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #5 (permalink)  
Old 01-11-04
Registered User
 
Join Date: Jul 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
jonspivey is an unknown quantity at this point
Hi,
Probably the easiest way to do url rewrites in asp.net is to stick some code in Application_BeginRequest to read in the url and rewrite it. For an example lets say you have pages fed from a database, you want to make links like this

http://you.com/1234.aspx (where 1234 is a product ID) and then rewrite to
http://you.com/showproduct.aspx?id=1234
you could do something like this

Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
Dim incoming As HttpContext = HttpContext.Current
Dim str As String = incoming.Request.Path.ToLower
Dim product As Match = Regex.Match(str, "\d\d\d\d")
If product.Success Then
incoming.RewritePath("/ShowProduct.aspx?id=" & product.Value)
End If
End Sub

Obviously that's simple - you could make this as complex as you need. There's 1 drawback with this, or any other url rewrite method, that only requests for .aspx pages will actually reach the aspx engine so while you can easily rewrite http://you.com/1234.aspx you couldn't rewrite something like http://you.com/1234 as this request would throw a 404 in IIS before it even reached asp.net. The only way around this would be to set every page request to go through asp.net (not a good idea and almost certainly disallowed by shared hosts)

The other option may be to use a custom 404 page in IIS - bear in mind this could be viable because IIS does NOT send a 404 response code if you have a custom 404 page set up - so the search engines will not be aware they're going through a 404.

Cheers,
Jon
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Affiliate Marketing RSS Feeds - Contact Us - Affiliate Marketing - Archive - Privacy Statement - Top

Content Relevant URLs by vBSEO 3.2.0 RC7