Forum Moderators: phranque
I have a doubt in redirecting the URL. I wrote a RewriteRule in the httpd.conf file with the parameters [R=301,L]. It is working as expected. But the redirected URL is getting changed in the browser's address bar.
How to keep the same/entered URL during redirection? Is that possible first of all? If that can be achieved and NOT called as redirection, how can we go about?
Thanks in advance.
Raghavan alias Saravanan M.
What you're looking for is an internal rewrite, not an external redirect.
The two forms are:
# External redirect
RewriteRule ^foo\.html$ http://www.example.com/bar.html [R=301,L]
#
# Internal rewrite
RewriteRule ^foo\.html$ /bar.html [L]
Jim