Hello, I want my blog to appear as www.mysite.com and that if I type a mysite.com the url would become a www.mysite.com I'm using Wordpress and I've been trying to configure the .htaccess at Wordpress folder but I failed. Anyone can suggest a solution of forcing nonwww to www url? Thanks.
add this to your .htaccess RewriteEngine on RewriteCond %{HTTP_HOST} !^www.your_domain.com$ RewriteRule ^(.*)$ http://www.your_domain.com/$1 [R=301]
Hi Domainco.Us, here's the .htaccess of Wordpress # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress Where should I insert your suggestion? Top most part? Thank you. RewriteEngine on RewriteCond %{HTTP_HOST} !^www.your_domain.com$ RewriteRule ^(.*)$ http://www.your_domain.com/$1 [R=301]
I inserted the above suggested rewrite code but I got this error instead: Moved Permanently The document has moved here. Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
pm me, i might help., I have just check the code above, seems you need to change form non www to www, try this
I had the same problem last night. I was using my host's cpanel to try to edit the .htaccess. I have been told that this is why mine may have not worked, but 2 scared 2 try again. lol
You do know there's a plugin that lets you choose whether to redirect to either the .www or non-www version of your URL path, right? (This plugin also strips index.php from the URI strings as well.) It's called Enforce .www Preference.