将所有 WordPress URL 设置为小写
我试图将所有 WordPress 网址设为小写,但以下代码似乎不起作用...
RewriteEngine On
RewriteBase /
RewriteMap tolower int:tolower
RewriteCond $1 [A-Z]
RewriteRule ^/(.*)$ /${tolower:$1} [R=301]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
I'm trying to to get all my WordPress urls to be lowercase, but the following code doesn't seem to be working...
RewriteEngine On
RewriteBase /
RewriteMap tolower int:tolower
RewriteCond $1 [A-Z]
RewriteRule ^/(.*)$ /${tolower:$1} [R=301]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 PHP 模块
mod_speling
(您需要先加载它)以及.htaccess
文件中的CheckCaseOnly on|off
选项。You can use the module
mod_speling
for PHP (you need to load it first) and theCheckCaseOnly on|off
option in your.htaccess
file.