Closed (fixed)
Project:
Global Redirect
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Dec 2008 at 19:39 UTC
Updated:
5 Jan 2009 at 12:00 UTC
Global redirect will be more useful if will redirect path that is cased wrongly to the correct case, i.e. if the alias is MyPage.php and user enter mypage.php, it will redirect to MyPage.php
I added this code to line after 131 to make it does so.
// CASE SENSITIVE REDIRECT
if ( $alias )
{
$alias_sensitive = db_result(db_query("SELECT dst FROM {url_alias} WHERE dst = '%s'", $alias));
if ( $alias_sensitive and $alias != $alias_sensitive )
drupal_goto($alias_sensitive, $query_string, NULL, 301);
}
// END HERE
Comments
Comment #1
nicholasthompsonAs this is the most recently opened issue, I'll leave this open... But it has been asked before (it seems)... Although I don't remember ever reading the last request!
See: #299399: Case Sensitive Redirects
This is an interesting request and I'd never noticed how Drupal didn't care about case sensitivity before.
Something I think which should be considered is that your query...
... will only work if the collation of the table ends in "
_ci".Please read this for more information:
http://mysqldatabaseadministration.blogspot.com/2006/09/case-sensitive-m...
I'll take a look into adding this to D5 and D6...
Cheers,
Nick
Comment #2
nicholasthompsonFix is committed to Drupal 6.x-1.x-dev. Will be in next major release (along with an entry in the admin page to enable/disable).
Fix/feature needs porting to Drupal 5.
Comment #3
nicholasthompsonFixed in DRUPAL-5.