Portal Home > Knowledgebase > Articles Database > URL redirection without changing the address in the address bar
URL redirection without changing the address in the address bar
Posted by prashant1979, 11-08-2007, 08:12 AM |
Hello,
I want to redirect a website to a certain URL so that the address bar shows the same URL and not the destination URL. I know it is possible via URL masking, however, I want it in such a way that whenever somebody clicks on any link in the website, the address bar should still show the original URL. To put it in simple words,
Suppose I want to redirect http://www.xyz.com to http://www.abc.com/pqr/index.htm. Now if there is a link named contact/index.htm and somebody clicks on it the address bar should display http://www.xyz.com/contact/index.htm and not redirect to http://www.abc.com/pqr/contact/index.htm.
How can it be possible using URL Rewrite method in .htaccess file? Can anybody guide me?
Regards
Prashant
|
Posted by foobic, 11-08-2007, 08:39 AM |
It can only be done by xyz.com acting as a proxy, fetching the contents of abc.com and passing them back to the visitor. Using mod_rewrite you'd add the [P] flag to get this behaviour but it will only work if you have mod_proxy enabled.
|
Posted by ServerSurgeon George, 11-08-2007, 12:45 PM |
Or you can share the same DocumentRoot for both of them(in case you are using Apache as webserver)
|
Add to Favourites Print this Article
Also Read