开发者

HTACCESS url rewrite pronblem

开发者 https://www.devze.com 2023-02-03 21:55 出处:网络
I have this rules: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule ^ind开发者_如何学JAVAex.html$ index.php?L=IT [L]

I have this rules:


Options +FollowSymLinks
RewriteEngine On
RewriteBase /

RewriteRule ^ind开发者_如何学JAVAex.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]

If I call www.test.com/en/index.html the rewrite dont work as i want. It call elenco.php ...?? any suggestion?


Switch your rules around.

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]

The elenco rule is getting executed before the en/index.html rule and your [L] parameter is preventing it from getting there.

0

精彩评论

暂无评论...
验证码 换一张
取 消