mod rewrite - How to forward one url to another using mod_rewrite rules -
I am trying to forward this url but it does not work - this is my code: < / P>
Rewrite rules ^ https: //www.wsjwine.com/discovery_offer.aspx? Promo = 2227006 $ https://www.wsjwine.com/discovery_offer_lp2.aspx?promo=2227006 [L]
You can only test. You need to make additional use for further tests.
Now if you want to rewrite each request for /discovery_offer.aspx to /discovery_offer_lp2.aspx Usage can only be used (for example for the .htaccess file in the root directory):
Rewrite ^ discovery_offer \ .aspx $ discovery_offer_lp2.aspx [L]
If you do not specify a query in the replacement, the originally requested query was automatically added to the new one. is.
And if you want to rewrite that specific URL, try it:
% rewritecond% {HTTPS}% {HTTP_HOST} = = www.wsjwine .com RewriteCond% {QUERY_STRING} = Promo = 2227006Rescript Rule ^ discovery_offer \ .aspx $ discovery_offer_lp2.aspx [L]
Comments
Post a Comment