本文介绍了停止请求index.php +++++++++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试重定向请求根索引的用户.php
我正在使用 Redirect 301/index.php http://mywebsite/junk/index.html
如果人们只请求index.php,这就可以了,但是现在我收到了很多请求用于index.php ++++(有时比其他++更多)
我可以添加一些内容到 Redirect 301/index.php
中,以包括重定向index.php +++吗?
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 requestsfor index.php++++ (sometimes more ++ than others)
is there something I can add to Redirect 301 /index.php
to include redirecting index.php+++ ?
推荐答案
您可以将 mod_rewrite
用于正则表达式功能和更好的控制:
You can use mod_rewrite
for regex capabilities and finer control:
RewriteEngine On
RewriteRule ^index\.php http://mywebsite/junk/index.html [L,R]
这篇关于停止请求index.php +++++++++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!