2010-08-08 77 views
0

对于SEO友好的URL我使用这个表达式:的.htaccess - 创建一个语言目录

RewriteRule ^([0-9]+).([^/]+)$ index.php?id=$1&titel=$2 

URL是domain.com/55-page-title和它的作品完美。

现在我必须确定不同的语言和我的网址应该看起来像domain.com/de/55-seitentitel。我不知道如何在.htaccess文件中重写正则表达式。

RewriteRule ^([0-9]+).([^/]+)$ index.php?lan=$1&id=$2&titel=$3 

我可以在'^'后插入什么?非常感谢!

回答

0

试试这个:

RewriteRule ^([a-z]{2})/([0-9]+).([^/]+)$ index.php?lan=$1&id=$2&titel=$3 
+0

完美!非常感谢你! – TorbenL 2010-08-08 13:27:25