Friday, 15 August 2014

.htaccess - mod_rewrite old Domain Rules to new Domain -



.htaccess - mod_rewrite old Domain Rules to new Domain -

i trying forwards old dynamic links new target

the old link had rewriterule in use

http://www.olddomain.com/index.php?cms=blog&action=..

so forwards cms=blog new domain http://www.newdomain.com/blog

to match querystrings utilize rewritecond directive. finish rule need place within www.olddomain.com/.htaccess be:

rewriteengine on rewritecond %{query_string} (^|&)cms=blog(&|$) rewriterule ^index\.php$ http://www.newdomain.com/blog? [r=302,l]

change 302 301 if necessary.

.htaccess url mod-rewrite redirect rewrite

No comments:

Post a Comment