我有一个重写.htaccess URL的Joomla网站。因此,在Google中,我的链接显示为: DOMAIN / abc ... 现在,主机上的重写mod可能已停止工作,我需要将所有人从Google重定向到链接,例如: DOMAIN / index.php / abc ...
我尝试过
RewriteEngine On
RewriteRule ^(.*)$ https://example.com/index.php/$1 [R=301,L]
但它不起作用。
答案 0 :(得分:0)
您应排除以index
开头的请求,以避免循环,因此,请更改规则,如下所示:
RewriteEngine On
RewriteRule !^index\.php https://example.com/index.php%{REQUEST_URI} [R=301,L]
注意:清除浏览器缓存