mcmuney Posted June 27, 2011 Share Posted June 27, 2011 I'm using the code below to redirect, which works, but it changes the url on the address bar. For example, typing /ipad-for-sale/ will redirect to ipadsale.php, but also changing the address bar to show ipadsale.php. I want the address bar to remain as /ipad-for-sale/. I've tried using [R], [L], [QSA,L], but nothing works. Any help would be greatly appreciated. RewriteEngine On RewriteRule ^ipad-for-sale/$ ipadsale.php RewriteRule ^iphone-for-sale/$ iphonesale.php Quote Link to comment https://forums.phpfreaks.com/topic/240503-rewrite-while-hiding-the-new-url-on-address-bar/ Share on other sites More sharing options...
cags Posted July 2, 2011 Share Posted July 2, 2011 Neither of those rules by themselves will cause a redirect, if the address in the browser is changing then it's being caused by something else. Quote Link to comment https://forums.phpfreaks.com/topic/240503-rewrite-while-hiding-the-new-url-on-address-bar/#findComment-1237582 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.