.htaccess case sensitive and mod_rewrite

前端 未结 2 2043
自闭症患者
自闭症患者 2020-12-07 02:22

My .htaccess:

RewriteEngine On
CheckCaseOnly On
CheckSpelling On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUES         


        
相关标签:
2条回答
  • 2020-12-07 02:25

    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.

    0 讨论(0)
  • 2020-12-07 02:33

    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

    0 讨论(0)
提交回复
热议问题