Hi, I hope all is going well all.
Also, I hope this can be easy to solve, but really I don’t know how.
After working on my site adding some nodes, I found in my stats that the same page is accessed using different caps.
Therefore, www.mysite.com/my-page-url (original via Path Alias) can be accessed, and is indexed by Google in different ways:
www.mysite.com/My-Page-Url
www.mysite.com/MY-page-url
www.mysite.com/my-pAge-URL
All are the same and not generate the (404) Not Found error
I was on 1st. position in Google, but after someone link to the page using different caps on the URL, It has been removed from the Google index.
I need only that the page be accessed using the original Path Alias, and 404 error for all other representations of the same node/url
Your help will be very appreciated.
This is what I have:
Drupal 5.3
MySQL 5.0.27
PHP 5.2.2
Clean URL
Global Redirect
Thanks
Tony Bonnet
Comments
...
That's an interesting problem. The table that holds the aliases is {url_alias}, and since the string fileds in it aren't case-sensitive, 'mY-pAgE-UrL' matches 'my-page-url'.
A quick fix is, using phpMyAdmin, to add the BINARY attribute to the fields in that table. That will make them case sensitive. The {menu} table may have a similar problem. Perhaps you'd like to open an issue? Let the developers discuss whether to make this the default behavior for Drupal.
(You may want to suggest this feature, case-sesitivity check, in the 'global redirect' module issue queue.)
URL Case Sensitive - Solved
Hi mooffie,
Thanks for your advice. The binnary attribute was set it for {menu.path}, {url_alias.src} and (url_alias.dst}, and issue was solved. Fix works very well.
I was searching on Drupal.org for solutions but I do not find anything about it.
Thanks again,
Tony Bonnet