aguawebdesign
asked on
URL masking using mod_rewrite
I am trying to redirect one URL to another, except that I want the original URL to remain in the browser address window.
Entered URL: http://www.website.com/news/2011/03/24/energy-saving-beyond-the-earth-hour/19639
Destination URL: http://www.website.com/news_detail.php?pr_id=19639
(The number following the final slash in the entered URL matches the ID in the destination URL)
What I have below is redirecting properly, but the destination URL is showing up instead of being masked as what was originally entered. How can I fix this so that the URL that was entered remains in the address window?
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^news/([^/]+)/([^/]+)/([^/ ]+)/([^/]+ )/([^/]+)$ http://www.website.com/news_detail.php?pr_id=$5 [NC,L]
Entered URL: http://www.website.com/news/2011/03/24/energy-saving-beyond-the-earth-hour/19639
Destination URL: http://www.website.com/news_detail.php?pr_id=19639
(The number following the final slash in the entered URL matches the ID in the destination URL)
What I have below is redirecting properly, but the destination URL is showing up instead of being masked as what was originally entered. How can I fix this so that the URL that was entered remains in the address window?
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^news/([^/]+)/([^/]+)/([^/
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER