使用.htaccess设置单词不敏感大小写



我有这个。htaccess规则。

# Shop-homepage
RewriteRule ABCDEF/fr-CA/$ shop-homepage.php?lang=fr&country=ca&shop=ABCDEF [L,QSA]
RewriteRule ABCDEF/en-CA/$ shop-homepage.php?lang=en&country=ca&shop=ABCDEF [L,QSA]
RewriteRule ABCDEF/en-US/$ shop-homepage.php?lang=en&country=us&shop=ABCDEF [L,QSA]

如何使ABCDEF不区分大小写?

谢谢。

使用NC标志。NC用于匹配URI中的大写和小写字符:

RewriteRule ABCDEF/fr-CA/$ shop-homepage.php?lang=fr&country=ca&shop=ABCDEF [L,QSA,NC]
RewriteRule ABCDEF/en-CA/$ shop-homepage.php?lang=en&country=ca&shop=ABCDEF [L,QSA,NC]
RewriteRule ABCDEF/en-US/$ shop-homepage.php?lang=en&country=us&shop=ABCDEF [L,QSA,NC]

相关内容

  • 没有找到相关文章

最新更新