【发布时间】:2011-11-03 04:12:47
【问题描述】:
我遇到了 mod rewrite 的问题,在这里没有找到任何解决方案。问题来了:
我有两种语言的网站,mod URL 应该是这样的:
/eng/contact
/srp/kontakt
/eng/news
/srp/vesti
/eng/event
/srp/najava
我的重写规则不起作用,因为我有这样的 .htacess 情况:
# news
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/?$ news.php?lang=$1&pagename=$2 [NC,L]
# contact
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/?$ contact.php?lang=$1&pagename=$2 [NC,L]
# event
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/?$ event.php?lang=$1&pagename=$2 [NC,L]
我的问题是如何实现上面例子中页面的重写?
【问题讨论】:
标签: .htaccess mod-rewrite multilingual seo