apache - Htaccess redirection -
this question has answer here:
- htaccess mod_rewrite [closed] 2 answers
how can redirect using htacces from: http://www.example.com/directory/wp-login.php?action=register
to: http://www.example.com/sitemap.html
you'll need use rewrite condition match against %{query_string}
variable (which action=register
in example), , match against uri in rewrite rule (which directory/wp-login.php
in example). it's pretty straightforward.
rewriteengine on rewritecond %{query_string} ^action=register(&|$) rewriterule ^directory/wp-login\.php$ /sitemap.html? [l,r=301]
these in htaccess file in document root, preferably before rules may have in there.
Comments
Post a Comment