.htaccess - Rewrite URL (Apache): Creating 301 redirects -


i restructured site, moving away querystring parameters friendly urls. url structure used use mysite.com/?site=www.somesite.com/. using site parameter part of page's path, new url structure being mysite.com/site/www.somesite.com

i cannot figure out proper rewrite rule .htaccess file redirect old url structure new

put in .htaccess file:

rewriteengine on  rewritecond %{query_string} ^site=(.*)$ rewriterule .* /site/%1 [l,r=301] 

edit: in reply comment #3

change rewriterule to:

rewriterule .* /site/%1? [l,r=301] 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -