homepage Welcome to WebmasterWorld Guest from 54.166.14.218
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
URL Rewriting Policies
haggul

5+ Year Member



 
Msg#: 4520321 posted 11:44 am on Nov 19, 2012 (gmt 0)

As part of an overall tidy up we are looking to implement rewriting using IIS URL Rewite Module 2 running on IIS7.

Our current urls are like:

/Product.aspx?PID=123456
/SubCategory.aspx?CID=1&SCID=99

We want to move them to :

/Product/Product-Name/123456
/SubCategory/Subcat-Name/99

The rewriting part is working well on my test site but I then got to reading about rules for trailing slashes and also enforcing lower case.

If I have these urls would they all be seen as different?

/Product/Product-Name/123456
/Product/Product-Name/123456/
/product/product-name/123456

Should I be adding rules to ensure trailing slashes for this style of url, and forcing everything to lower or is that going overboard?

Obviously if we are moving to a new structure we want to do it once and do it right first time.

I am setting canonical tag in each page, and also going to put a 301 in if the incoming URL doesn't match what I expect. Oh and 301s from old style URLs to new. Also in the rewrite module I can set a canonical rule for overall urls to always include the www or not.

Does that sound like a plan or a recipe for instant traffic massacre?!

Thanks.

 

phranque

WebmasterWorld Administrator phranque us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



 
Msg#: 4520321 posted 2:20 am on Nov 21, 2012 (gmt 0)

everything after the hostname in a URL is case-sensitive and the trailing slash is significant and indicates directory structure or hierarchical structure in the path.
those are three different URLs.

on windows server, you must Configure Case Sensitivity for File and Folder Names:
http://technet.microsoft.com/en-us/library/cc725747.aspx [technet.microsoft.com]

i would strongly suggest going with all lowercase in the URL and internally rewrite all requests with uppercase in the URL to a redirect script.

make sure all non-canonical requests are redirected in one hop.

incrediBILL

WebmasterWorld Administrator incredibill us a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



 
Msg#: 4520321 posted 8:48 pm on Nov 23, 2012 (gmt 0)

everything after the hostname in a URL is case-sensitive


While that is generally true when working in the real world, I thought Windows boxes were configured case-insensitive by default?

phranque

WebmasterWorld Administrator phranque us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



 
Msg#: 4520321 posted 3:12 am on Nov 24, 2012 (gmt 0)

it's the Windows Server OS that is case-insensitive by default, which is a perfect example of why you should look away from MS for proper implementation of HTTP protocol or best web practices.

so yes - "out of the box" it will happily serve 200 OKs for 2**N - 1 non-canonical casing combinations but that doesn't make it optimal or correct or recommended.
the search engines are where it gets "real world" here and they will index those as different URLs which means duplicate content.
your browser won't style your anchor text as "visited" unless the casing of the url matches.

windows server is not the "real world" - it's more like disneyworld.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved