【问题标题】:.htaccess - Set GET Variable everytime at the end.htaccess - 每次最后都设置 GET 变量
【发布时间】:2015-10-21 11:56:02
【问题描述】:

嗨, 我马上把我的网站变成了一个多语言网站。 问题: 我想从 GET 变量中读取用户的语言环境。所以 htaccess 必须在最后写下这个语言环境。

如果这个问题已经存在,请将链接发给我,或者当地有没有更简单的方法告诉我。

【问题讨论】:

标签: php .htaccess multilingual language-features language-translation


【解决方案1】:

你可以使用 ModRewerite 做到这一点

RewriteCond %{QUERY_STRING} !locale=
RewriteRule ^(.+)$ $1?locale=DE [QSA,NC,L]

【讨论】:

  • 感谢您的快速回复。我稍后测试它
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-07-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-07-24
  • 2020-04-03
相关资源
最近更新 更多