Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache rewrite

Status
Not open for further replies.

sniper57

Technical User
May 27, 2009
3
NL
Hi,

I am trying to redirect a site to a new site but have a few issues:-

For example I want to redirect:
to

This is what I have configured in httpd.conf:-

Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} dev.example.com [NC]
RewriteRule ^(.*)$ [URL unfurl="true"]http://dev.othersite.com:9011/$1[/URL] [R=301,L]


TESTS
If I enter in the browser I get the Apache index.html page. I am not sure why?

If I enter in the browser I get page not found which I expect

If I enter in the browser I get the expected page and the redirect works

If I enter in the browser I get "unable to connect" ... I expect that is because 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
 
I fixed it:-

Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} dev.example.com [NC]
RewriteRule (.*)$ [URL unfurl="true"]http://dev.othersite.com:9011$1[/URL] [R=301,L]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top