apache - Htaccess redirection -


this question has answer here:

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

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -