dimanche 30 octobre 2016

Redirect to www. from .htaccess

  Aucun commentaire


Hey,
Here some lines of code that redirects from your non-www domain to your www. domain.

i.e :
I want to redirect from example.com to www.example.com

Add the code below to your .htaccess file :
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

Aucun commentaire :

Enregistrer un commentaire