.htaccess - Forward to www in WordPress multisites -


I have WordPress multisite (using subfolders, not subdomain) format in domain. For the reasons for consistency and better SEO, I want to send it to www.domain.com.

I have tried to put this code in .htaccess but the code forwarding me to revittengine on Rev.it% {HTTP_HOST} is: ^ www \ revittengen Rewartbase / rewrite array ^ index \ .php $ - [L]. RewriteRule ^ (. *) $ Http: //www.% {HTTP_HOST} / $ 1 [R = 301, L] # Add a backward slash to / wp-admin RewriteRule ^ ([_ 0- 9a-zA-Z - ] + /)? Wp-admin $ $ 1wp-admin / [R = 301, L] Rev.% {REQUEST_FILENAME} -F [OR] Rev.% {REQUEST_FILENAME} -d Records Rules ^ - [L] Remit Rules ^ ([_ 0- 9a- Za-z -] + /)? (Includes Wp- (content | admin |). *) $ 2 [L] rewritable ^ ([_ 0- 9a-zA-Z-] + /)? (. * .php) $$ 2 [L] Rewriteable Index.php [L]

I'm pretty sure that my domain is set to www in WordPress settings but it does not It will not say that I now have a multisite

I will try first no Using the htaccess redirect and remove www, you have to redirect. Then edit your wp-config.php and change the DOMAIN_CURRENT_SITE to your www domain. This way the WordPress redirection has to be handled.


Or you can try the htaccess method, but you may have some order issues, I believe with the MU, the redirect needs to be the first thing. Replace domain.com with your actual site

  Rewriteignin rewrite code% {HTTP_HOST} ^ domain.com $ [nc] rewritable ^ (. *) $ Http: //www.domain Com / $ 1 [R = 301, L] RewriteBase / RewriteRule ^ index \ .php $ - [L] Add a vertical slash for wp-admin ^ ([_ 0- 9a-zA-Z-] + / )? Wp-admin $ $ 1wp-admin / [R = 301, L] Rewrite code% {REQUEST_FILENAME} -F [OR] Rev.% {REQUEST_FILENAME} -D Rivroitium ^ - [L] Remit Rule ^ ([_ 0- 9A- GA-Z -] + /)? (Wp- (*) $ 2 [L] Rev. Raul ^ ([_ 0- 9A-J-a-Z-] + /)? (. * .php) $ $ 2 [L] Rev. Raul Index.php [L]  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -