My .htaccess:
RewriteEngine On
CheckCaseOnly On
CheckSpelling On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^Blog/(.*?)$ /Me/profile.php?username=$1 [QSA,L]
The problem is, when the URL is like this, it works:
localhost/Me/Blog/ExampleUser
But it doesn't work when it is like this (notice the 'b' in 'Blog' is in lowercase?):
localhost/Me/blog/ExampleUser
I'm running it on the new version of XAMPP. It is wierd its not working even though I have the mod_speling.so on the PHP config.
What is the problem?
Use of the [NC] flag causes the RewriteRule to be matched in a case-insensitive manner. That is, it doesn't care whether letters appear as upper-case or lower-case in the matched URI.
Try [QSA,L,NC] instead, so the comparison is made in a case-insensitive manner
the problem is that rewrite rules ARE case sensitive. So your Rewrite rule should be:
RewriteRule ^[Bb]log/(.*?)$ /Me/profile.php?username=$1 [QSA,L]
and voila you are fixed.
mod_speling.so has NOTHING to do with this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With