What are the .htaccess elements REQUEST_FILENAME and THE_REQUEST?
问题 What is returned by %{REQUEST_FILENAME} and %{THE_REQUEST}? I was just checking over our .htaccess file and it dawned on me, I have very little knowledge of this. The code below uses both. It works I just want understand it. #remove / at the end of URL RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.+)/$ /$1 [L,R=301] #remove /index.php at the end of URL RewriteCond %{THE_REQUEST} ^.*/index.php RewriteRule ^(.*)index.php$ /$1 [R=301,L] Cheers, Mark 回答1: