mod_rewrite其他规则如果有更多参数

时间:2012-08-10 21:05:15

标签: mod-rewrite

我实际上使用这个mod_rewrite为我的系统做了SEO友好:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ $1/ [L,R=301] 
RewriteRule ^(.*)/$ /?c=$1&l=deu

我不知道它为什么会起作用但是经过几个小时的尝试和放大错误这是我的解决方案,现在我想扩展它。

我想要像

这样的东西

"if /eng/ is on the end of the url, redirect request to ?c=$1&l=eng"

在其他所有情况下,都应使用上面公布的规则。

是的,有人能帮帮我吗? (抱歉我的英语不好)

1 个答案:

答案 0 :(得分:0)

尝试在301规则

之后添加此权限
RewriteRule ^(.*)/eng/$ /?c=$1&l=eng [L]
相关问题