stop requests for index.php+++++++++

眉间皱痕 提交于 2021-01-28 06:47:14

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!