0

I have done multisite installation and also created wildcard subdomain. When i type the domain with www the website redirected successfully. However, when i type the domain WITHOUT www, the page gets failed and says no url found. Pls help me with this issue. I am trying hard to get this one success from yesterday.

I have provided the code given in installation to replace in .htaccess file.

  • Hi! The main domain is registered with WWW or without WWW? Also, I can't see any .htaccess code. – Dragos Sandu Sep 05 '14 at 17:33
  • Main domain is with www. Below is the existing .htaccess code # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^(wp-(content|admin|includes).*) $1 [L] RewriteRule ^(.*\.php)$ $1 [L] RewriteRule . index.php [L] # END WordPress – pollachi Sep 06 '14 at 01:49

1 Answers1

0

I'm in a big hurry. Code for redirecting from non-www to wwww is the following:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com [NC]
RewriteRule (.*) http://www.domain.com/$1 [L,R=301]

Add it at the beginning of the file.

Dragos Sandu
  • 664
  • 3
  • 16