Thursday, 5 September 2013

htaccess redirect to external website without changing address bar

htaccess redirect to external website without changing address bar

I have a subdoman called, let's say:
cloud.mygizmo.com
But when someone navigates to this URL I want them to actually go to:
11.22.33.44/cloud
Which is on a completely different host from mygizmo.com and can't be moved.
In my .htaccess I have this:
RewriteEngine on
# Use PHP5.4 as default
AddHandler application/x-httpd-php54 .php
RewriteCond %{HTTP_HOST} ^cloud\.mygizmo\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.cloud\.mygizmo\.com$
RewriteRule ^/?$ "http\:\/\/11\.22\.33\44\/cloud" [L]
Which does do the redirect, but it still changes the address bar in the
user's browser.
How do I configure this so that it does the redirect, but keeps
cloud.mygizmo.com in the address bar?

No comments:

Post a Comment