First, put the following line in the <VirtualHost>
section of your .conf file.
(For me that lives at /etc/httpd/vhosts.d/00foo.conf
.)
RewriteMap lc int:tolower
You can replace lc
with any name you want.
Then restart apache, which you can do with sudo service httpd restart
.
Finally, add this in your .htaccess file:
RewriteRule ^/(.*)$ /${lc:$1}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…