首页 > 解决方案 > 删除查询字符串和参数异常

问题描述

这个例子对我有用,但是...... 删除查询字符串和参数

对于某些 URL,我需要其中一个参数。我用这个:

# Remove the entire query string if any one 
# of the URL params are present
RewriteCond %{QUERY_STRING} (&|^)(L|cHash)=
RewriteRule ^ %{REQUEST_URI} [QSD,R=301,L]

但需要 cHash-Parameter 用于表单 URL,例如:

https://www.example.ch/kontakt/kontaktformular?cHash=40be5c21cb78c4b9194d39a94d4a5246

或者

https://www.example.ch/example2/kontaktformular?cHash=a3fe72226dffe6e1ac8c84e3af0887ae

如何解决这个问题?

标签: .htaccess

解决方案


推荐阅读