如何将所有请求发送到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]
但这又会导致无限循环。
4条答案
按热度按时间kmynzznz1#
试试看:
wpx232ag2#
对于Apache,请使用mod_rewrite:
9avjhtql3#
.htaccess网站
或
/etc/apache 2/可用站点/站点配置文件
vdzxcuhz4#
这有效地将我发送到index.php,而不会导致循环。