.htaccess - Wordpress messed up our htaccess redirect, how to modify to work with Wordpress' htaccess code? -


we had several domains parked on top of our main website. normal html website , used following redirect domain 301 redirect proper url avoid getting dinged google.

rewritecond %{http_host} ^ourmainsiteurl\.com$  rewriterule ^.*$ http://www.ourmainsiteurl.com%{request_uri} [r=permanent,l] 

so above htaccess code rewrites url www.ourmainsiteurl.com, want.

now here's problem... installed wordpress , has following default htaccess code:

# begin wordpress <ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /index.php [l] </ifmodule> # end wordpress 

i tried add redirect code in broke wordpress. can tell me need use make work?

simply put want parked domains (ie: parkedurl1.com, parkedurl2.com, etc) redirected www.ourmainsiteurl.com htaccess file.

make sure redirect before wordpress rules:

rewritecond %{http_host} ^ourmainsiteurl\.com$ [nc] rewriterule ^.*$ http://www.ourmainsiteurl.com%{request_uri} [r=permanent,l]  # begin wordpress <ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /index.php [l] </ifmodule> # end wordpress 

if it's still not working, check see if wordpress has turned on redirecting, or adding/removing "www" hostname.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -