Hi,
I am trying to redirect a site to a new site but have a few issues:-
For example I want to redirect:
http://dev.example.com/page?Id=12345
to
http://dev.othersite.com:9011/page?param=12345
This is what I have configured in httpd.conf:-
RewriteEngine on
RewriteCond %{HTTP_HOST} dev.example.com [NC]
RewriteRule ^(.*)$ http://dev.othersite.com:9011/$1 [R=301,L]
TESTS
If I enter http://dev.example.com/ in the browser I get the Apache index.html page. I am not sure why?
If I enter http://dev.example.com/test in the browser I get page not found which I expect
If I enter http://dev.example.com/echo in the browser I get the expected page and the redirect works
If I enter http://dev.example.com/console in the browser I get "unable to connect" ... I expect that is because http://dev.othersite.com:9011/console returns a 403? Does that make sense?
Any help/pointers much appreciated! (I realise I haven't addressed the query_string yet but that can wait..)
Many thanks
simon