我将所有的.php扩展名重定向到.html,但我遇到了循环问题。重定向循环URL重写
例如,来自:
-mywebsite.com/country/france-php/paris.php
到
-mywebsite.com/country/france-php/paris.html
这里是我的.htaccess:
RewriteEngine On
RewriteBase/
RewriteRule (.+)\.php$ $1.html [R=301,L]
RewriteRule (.+)\.html$ $1.php [L]
FallbackResource /index.php
当重定向侦探分析,我得到很多的重定向:
-mywebsite.com/country/france-php/paris.html
工作正常:-mywebsite.com/country/france-php/paris.php和-mywebsite.com/country/france-fcret/但不-mywebsite.com/country/france-php/ –
@IssamHmz“mywebsite.com/country/france-php /'应该发生什么? – hjpotter92
内法国的PHP文件中的index.php所以它必须打开它,但你的解决方案不会打开它只是文件作为法国-XRF法国-fff打开 –