homepage Welcome to WebmasterWorld Guest from 54.211.157.103
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Case Sensitive Urls and Internal Navigation
zehrila




msg:4322425
 10:28 am on Jun 6, 2011 (gmt 0)

Okay, by default my urls structure is in mixed case, e.g domain.com/Green-Blue-Widgets.html and Google for some reasons is indexing two versions of my urls domain.com/Green-Blue-Widgets.html and domain.com/green-blue-widgets.html . Now i want to 301 redirect all urls to lowercase, but my internal navigation is all mixed case e.g the category page domain.com/Green has all the products listed in the page with mixed case.

I know its bad programming, but i will really appreciate if any one can look into the matter for me and usggest a solution.

 

Tommybs




msg:4324453
 7:15 am on Jun 10, 2011 (gmt 0)

You could just try using the canonical tag for duplicate content issues as a quick solution

g1smd




msg:4324457
 7:28 am on Jun 10, 2011 (gmt 0)

Solution 1:

Redirect the incorrectly cased URL requests to all lower case and fix the internal navigation. Do this one section of a time for the site.

Solution 2:

Add code to the start of the PHP (or whatever) scripts that run the site to compare the URL request with what is in the database for that page. Issue a redirect if it is not an exact match. This retains your mixed case site but fixes non-valid requests.

Solution 3:

As per solution 2 but add canonical tag to the page header instead of redirecting.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
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