2010-08-08 67 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