Reply
Employee
owen
Posts: 213
Registered: 09-14-2011
0

Re: Vanity redirects to a second server

Response from community member: Rudolph

 

Hi Owen,

 

Thanks for the response, I will give it a go.

 

Regards,

Employee
owen
Posts: 213
Registered: 09-14-2011
0

Re: Vanity redirects to a second server

Hi Rudolph,

 

Use http.redirect( "/" ) to force your client browser to re-request the resource using the new URL

 

Regards,

Administrator
mgyles
Posts: 26
Registered: 10-20-2011
0

Vanity redirects to a second server

Hi

 

I know it is possible to do a redirect from http://www.mycompany.com/newserver to mynewserver.com The vanity redirect will still display http://www.mycompany.com/newserver even though I am on the home page for mynewserver.com

 

Below is the code for achieving this:

 

$hh = http.gethostheader();
$path = http.getpath();

if( $hh == "www.mycompany.com" && $path == "/newserver" ) {

http.setHeader( "Host", "www.mycompany.com" );
http.setPath( "/" );
pool.use( "POOL-newserver" );

}

 

When I start browsing the site, the url changes to http://newserverwich is normal behaviour.

 

I was wondering if it is possble to mask http://newserver in such a way that it will keep on displaying the vanity redirect on the user's browser.

‬‪‬‪‬‪