Case sensitive URLs


(Nic Hubbard) #1

Is there a way to make it so that my URLs are NOT case sensitive? If someone accesses www.mysite.com/news/ it works great, but if they go to www.mysite.com/News/ it throws the 404 error. Would I have to use a redirect for every page?


(Avi Miller) #2

URLs on Linux systems are (almost) always case-sensitive, so this is the default behaviour. Though, it would be a good feature request that if the exact URL is not found, check for the lowercase version.


(Daniel Nitsche) #3

mod_speling (yes it is spelt with one “l” :slight_smile: ) is pretty good at this, but I assume it won’t work with Matrix, as it scans the file system for matching files/pages.


Although it should work with file assets served out of the __data directory.


(Andrei Railean) #4

bug #2311


If you submit a bug report/feature request, please link to it from the forums so that it’s easier to monitor for other people.



The following syntax will generate the link automatically

    [bug]2311[/bug]


Thanks

(Nic Hubbard) #5

Sorry about that! I will be sure to do that next time. Thanks for taking care of it!


(Adendle) #6

[quote]Is there a way to make it so that my URLs are NOT case sensitive?  If someone accesses www.mysite.com/news/ it works great, but if they go to www.mysite.com/News/ it throws the 404 error.  Would I have to use a redirect for every page?
[right][post=“15395”]<{POST_SNAPBACK}>[/post][/right][/quote]



You could also use mod-rewrite (apache magic) for some high priority URLs that you wanted people to always access…



For example to redirect users from www.site.com/Test to www.site.com/test



<If Module rewrite_module>

RewriteEngine On

RewriteBase /Test

RewriteRule ^index\.html http://www.site.com/tes

</IfModule>



Just a though, may not be so good if you have lots and lots of these???Management of them could get yucky…



A :ph34r: