【发布时间】:2015-11-03 17:21:50
【问题描述】:
我正在将所有 .php 扩展名重定向到 .html,但我遇到了循环问题。
例如来自:
-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
【问题讨论】:
标签: mod-rewrite url-rewriting url-redirection friendly-url