Force www on all your domains, or not...
Previous article Next articleA generic piece of code you can drop in all of your root .htaccess files to force www., or do the opposite and remove the www. in the URL no matter what the domain name is.
How to use
To avoid SEO and cookie issues you can set up your website with or without "www." in the URL. The code below will work on any domain name so it's really easy to include it in your "default" root .htaccess file.
Check the following article for use with: HTTPS »
Preferring http://www.website.com
<IfModule mod_rewrite.c>
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
Preferring http://website.com
<IfModule mod_rewrite.c>
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
</IfModule>
Comment Form
ReviewManager
ReviewManager
0 Comments
Bermain slot gacor memadai bersama dengan RP 25.000 udah dapat mencapai kemengan hingga jutaan dan langkah depsotinya pun banyak variasi terlampau enteng dan flexibel dapat dilaksanakan dimana saja.
Focued Plumbing
519 W Lakee Dr
Edwardszville IL 62025
(618) 418-3102
Plumber Near Me