Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess 500服务器在小写URL上出错_.htaccess - Fatal编程技术网

.htaccess 500服务器在小写URL上出错

.htaccess 500服务器在小写URL上出错,.htaccess,.htaccess,当用户在url(例如site.com/Personal)中键入的url为site.com/Personal时,我试图使我的所有url始终为小写。。。我尝试了两种不同的方法,一种不起作用,另一种给出了500个内部服务器错误 500内部服务器错误 RewriteMap lowercase int:tolower RewriteCond $1 [A-Z] RewriteRule ^/(.*)$ /${lowercase:$1} [R=301,L] 不起作用 <IfModule mod_spe

当用户在url(例如site.com/Personal)中键入的url为site.com/Personal时,我试图使我的所有url始终为小写。。。我尝试了两种不同的方法,一种不起作用,另一种给出了500个内部服务器错误

500内部服务器错误

RewriteMap lowercase int:tolower
RewriteCond $1 [A-Z]
RewriteRule ^/(.*)$ /${lowercase:$1} [R=301,L]
不起作用

 <IfModule mod_speling.c>
  CheckCaseOnly On
  </IfModule>

只检查箱子

您不能在.htaccess文件中使用RewriteMap。您只能在服务器配置或virtualhost配置文件中使用它。此外,如果在.htaccess文件中编写重写规则,则前导斜杠(前缀)将被删除,因此您将永远无法匹配^/(.*),因为从来没有前导斜杠