How to set X-Robots-Tag in htaccess for any query string
Daniele Scasciafratte
Posted on April 5, 2023
It is just a note for me to remember this trick:
RewriteCond %{QUERY\_STRING} . RewriteRule .\* - [E=MY\_SET\_HEADER:1] [QSD,R=302,L]
Header set X-Robots-Tag "noindex, nofollow" env=MY\_SET\_HEADER
It is based on the suggestion here but with a change to support if there is any query string in the URL. [...]
The post How to set X-Robots-Tag in htaccess for any query string appeared first on Daniele Mte90 Scasciafratte.
π πͺ π
π©
Daniele Scasciafratte
Posted on April 5, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
datascience SeaTunnel-Powered Data Integration: How 58 Group Handles Over 500 Billion+ Data Points Daily
November 20, 2024
javascript Enhancing Task Scheduling Reliability: Integrating Arthas for API Monitoring in DolphinScheduler
November 5, 2024