我有这样的设置http://www.example.com/reroute/index.php。 我想发送所有请求不要index.php到index.php。因此,任何到/reroute /产品将去/reroute/index.php和将显示http://www.example.com/reroute到浏览器。它似乎很简单,但我试过的每件事都告诉我文件不存在或发送给我一个循环。.htaccess重定向请求不index.php
另外,是否可以在我重新路由之前设置自定义标题?
Options +FollowSymLinks
IndexIgnore */*
# Turn on the RewriteEngine
RewriteEngine On
RewriteCond %{IS_SUBREQ} false
RewriteRule ^/index\.php$ http://www.example.com/reroute [R=301,L]