My goal is simply to redirect:
/jsn.php?parameters
to http://www.site2.com/jsn.php?parameters
I tried with
Redirect permanent /jsn.php(.)* http://www.site2.com/jsn.php$1
A 301 Permanent Redirect permanently redirects one URL to another. You set up a 301 redirect using . htaccess to send visitors to a new URL and tell search engines that a page has moved so that the new page can be properly indexed. Some common uses of a 301 redirect with .
htaccess rewrite rules can be used to direct requests for one subdirectory to a different location, such as an alternative subdirectory or even the domain root. In this example, requests to http://mydomain.com/folder1/ will be automatically redirected to http://mydomain.com/folder2/.
Query string parameters are automatically passed, you simply want to do this:
Redirect permanent /jsn.php http://www.site2.com/jsn.php
The (.)*
doesn't work with the Redirect
directive, you were probably thinking of RedirectMatch
, but either way, you don't need it. And also (.)*
should be (.*)
, otherwise the $1 backreference would only get the first character.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With