In httpd redirecting and preserving the query parameters.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

In httpd redirecting and preserving the query parameters.

Peter Fraser-2
                location match "^(.*)[.]shtml$" {
                                block return 301 "<a href="https://$SERVER_NAME%1.htm?$QUERY_STRING">https://$SERVER_NAME%1.htm?$QUERY_STRING"
                }

I used the above to change and web address ending in .shtml to the same ending in .htm

The redirect went to the right spot, but each  '&' got converted to '%26' in the query string.

So how do I do such a redirect?