问题
I am trying to redirect users requesting a root index.php
I was using Redirect 301 /index.php http://mywebsite/junk/index.html
while this works ok IF people only request index.php,
but now i am getting many requests
for index.php++++ (sometimes more ++ than others)
is there something I can add to Redirect 301 /index.php
to include redirecting index.php+++ ?
回答1:
You can use mod_rewrite
for regex capabilities and finer control:
RewriteEngine On
RewriteRule ^index\.php http://mywebsite/junk/index.html [L,R]
来源:https://stackoverflow.com/questions/21196319/stop-requests-for-index-php