mod_rewrite one url to another url without changing source url
Posted
by Dr. DOT
on Stack Overflow
See other posts from Stack Overflow
or by Dr. DOT
Published on 2010-06-08T17:43:31Z
Indexed on
2010/06/09
1:42 UTC
Read the original article
Hit count: 964
mod-rewrite
Is it possible to do a mod_rewrite from one url to another without changing what appears in the address bar?
Example:
Source URL is http://domain1.com/news Target URL is http://domain2.com/news
I want to render pages from http://domain2.com/news/ but have http://domain1.com/news appear in the address bar.
Is this possible?
I've got this directive, but the URL in the address bar changes (which I don't want to happen):
RewriteRule ^(.*)$ http://domain2.com/news/ [L,NC]
© Stack Overflow or respective owner