如何将所有请求发送到 www.myurl.com/{ANYTHING} 并将它们全部发送到 www.myurl.com/index.php
我发现我可以通过以下方式发送所有内容:
RewriteRule .* index.php [R=Permanent,L]
这非常有效,除了由于我的 cpanel/apache 安装而导致我被重定向到 www.myurl.com/home/username/public_html 之外。所以我将代码更改为
RewriteBase /
RewriteRule .* index.php [R=Permanent,L]
但这又会导致无限循环。
Try:
RewriteCond %{REQUEST_URI} !^/index.php
RewriteRule .* /index.php [R=Permanent,L]
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)