Hi,
I am trying to redirect a site to a new site but have a few issues:-
For example I want to redirect:
htt
p://dev.example.com/page?Id=12345
to
htt
p://dev.othersite.com/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/something in the browser I get page not found which I expect
If I enter http://dev.example.com/echoTest 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 htt
p://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
[edited by: Ocean10000 at 5:03 pm (utc) on Feb 6, 2015] [edited by: phranque at 11:03 pm (utc) on Feb 6, 2015]
[edit reason] Please Use example.com [webmasterworld.com] [/edit]