.htaccess HTACCESS url重写问题

.htaccess HTACCESS url重写问题,.htaccess,url-rewriting,.htaccess,Url Rewriting,我有以下规则: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule ^index.html$ index.php?L=IT [L] RewriteRule ^([a-zA-Z0-9_-]+)$ elenco.php?L=IT&url=$1 [L] RewriteRule ^en/index.html$ index.php?L=EN [L] 选项+FollowSymLinks 重新启动发动机 重

我有以下规则:

Options +FollowSymLinks
RewriteEngine On
RewriteBase /

RewriteRule ^index.html$ index.php?L=IT [L]

RewriteRule ^([a-zA-Z0-9_-]+)$ elenco.php?L=IT&url=$1 [L]

RewriteRule ^en/index.html$ index.php?L=EN [L]


选项+FollowSymLinks
重新启动发动机
重写基/

重写规则^index.html$index.php?L=IT[L]

重写规则^([a-zA-Z0-9_-]+)$elenco.php?L=IT&url=1[L]

重写规则^en/index.html$index.php?L=en[L]


如果我打电话到www.test.com/en/index.html,重写就不会像我想的那样工作。它叫elenco.php。。。??有什么建议吗?

改变你的规则

RewriteRule ^en/index.html$ index.php?L=EN [L]
RewriteRule ^index.html$ index.php?L=IT [L]
RewriteRule ^([a-zA-Z0-9_-]+)$ elenco.php?L=IT&url=$1 [L]
elenco规则在en/index.html规则之前执行,您的
[L]
参数阻止它执行