Adding WWW to your domain
-
I know this doesn’t directly relate to WP. But i think you guys can help fixing it.
Here is the code to have “WWW” in your URL for .htaccess
RewriteCond %{HTTP_HOST} ^domain.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
This perfectly works on my other domains where I dont have WP installed in home directory.
Here is what I have in my .htaccess
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
When I add those two lines of code in after #END, the site won’t open. What am I doing wrong?
- The topic ‘Adding WWW to your domain’ is closed to new replies.