【问题标题】:.htaccess - create a language dir.htaccess - 创建语言目录
【发布时间】:2010-08-08 13:19:18
【问题描述】:

对于 SEO 友好的 url,我使用这个表达式:

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

网址是 domain.com/55-page-title,它运行良好。

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

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

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

【问题讨论】:

    标签: .htaccess url-rewriting


    【解决方案1】:

    试试这个:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-03
      • 2020-08-22
      • 1970-01-01
      相关资源
      最近更新 更多