.htaccess RewriteCond excluding directories does not work when there is an .htaccess or php.ini in subdirectory

You can try adding RewriteEngine On to the top of the subdirectory .htaccess file. This will have the effect of completely overriding the mod_rewrite directives in the parent (ie. WordPress) .htaccess file, because mod_rewrite directives are not inherited by default. So by enabling the rewrite engine in the subdirectory, the WordPress front-controller will not execute … Read more

where to add redirection rewriterule in .htaccess file?

Your external redirect needs to go at the very top of your .htaccess file, before the WordPress front-controller (ie. before the # BEGIN WordPress section). If you place it at the end of the file then it will simply never get processed, because the WordPress front-controller routes all URLs and then stops further processing. If … Read more

Multisite Redirection to new domains

Try adding something like the following at the top of your .htaccess file: RewriteCond %{HTTP_HOST} ^(www\.)?oldone\.com RewriteCond ${REQUEST_URI} !^/wp-admin RewriteCond ${REQUEST_URI} !^/wp-login RewriteRule . http://newone.com%{REQUEST_URI} [R,L] Make sure the browser cache is clear. Change to 301 (if that is the intention) only when you are sure it’s working OK. Repeat for any other oldoneN.com / … Read more