regex - Redirect 301 with params -
i redirecting traffic between old web , new web , need redirect 301 /hotel.php?hotel=lasvegas&lng=es
http://www.new-web.com/hotel-las-vegas/
how possible htaccess? have tried
rewriterule ^hotel\.php\?hotel=lasvegas\&lng=es http://www.new-web.com/hotel-las-vegas/ [l,r=301]
i think error @ regular expression. can me?
you can use code in document_root/.htaccess
file:
rewriteengine on rewritebase / # external redirect actual url pretty 1 rewritecond %{the_request} /hotel\.php\?hotel=lasvegas&lng=es [nc] rewriterule ^ hotel-las-begas? [r=302,l,ne] # internal forward pretty url actual 1 rewriterule ^hotel-las-vegas/?$ hotel.php?hotel=lasvegas&lng=es [l,qsa,nc]
Comments
Post a Comment