I have a URL like
www.testwebsite.com?param1=abc
or
www.testwebsite.com/?param1=abc
I need to redirect to
http://www.testwebsite.com/level1/xyz.html?customparam=123¶m1=abc
I tried working on rewrite url but i am still new to this and need some help to achieve the solution
This is what i did till now
RewriteCond %{QUERY_STRING} param1=(.+)
RewriteRule ^/$ /level1/xyz.html?customparam=123¶m1=%1 [R=301,L]
Try adding the following to the
.htaccessfile in the root directory of your site.Only param1 will be captured and passed through, other query string params will be dropped.