Block query string debug=layout on dispatcher & AEM publish
I want to block access to all requests having querystring matching debug on dispatcher and redirect those requests to homepage after stripping this query string. Need help on this.
I want to block access to all requests having querystring matching debug on dispatcher and redirect those requests to homepage after stripping this query string. Need help on this.
Hi, Rajeev
In your httpd ".conf" file, inside your VirtualHost tag - Write these rules.
RewriteEngine On
RewriteCond %{QUERY_STRING} debug=layout
RewriteRule .* /? [R,L]
What it will do - For Eg.,
If your request url is - http://www.example.com/homepage.html?debug=layout
then it will redirect the url to http://www.example.com
Hope this helps!
Thanks,
Vamsi
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.