Redirect 301 /resort.php/FOO/BAR http://www.sitename.com.com/index.php
RewriteRule ^/direct/(.*) /direct/$1 [QSA,L] # access non i18n files directly
RewriteRule ^/([a-z]{2}\/.*) /$1 [QSA,L] #any language subdirectory should be left alone
RewriteRule ^/(.*\/$) /en/$1index.php [QSA,L] #fix for links ending in/
RewriteRule ^/(.*\.php) /en/$1 [QSA,L] #any php file with no language subdirectory redirects to the default language
为什么第一个Redirect 301不会进入主页?当我将其替换为...Apache - 重写规则混淆
RewriteRule ^/resort.php(.*) http://www.sitename.com/index.php [R=301,L]
它开始工作。我确信这是因为我有一堆规则,它会跳到另一个,但我有点失落,也许上师可以更清楚地解释这一点。
我的目录结构如下所示:
/en/index.php
/direct/
有根没有的index.php,我就重定向到最初的连接。
啊,我知道这是某种冲突。 – 2009-09-01 18:26:30