X

Redirect without WWW to a WWW domain for Vhost.

Adding redirect to preferred domain with WWW instead of without www.

Use the following .


  ServerName www.namran.net
  ServerAlias namran.net
  RewriteEngine on
  RewriteCond %{HTTP_HOST}                ^namran.net(:80)?$
  RewriteRule ^/(.*)                      http://www.namran.net/$1 [L,R=301]

  
    Order deny,allow
    Allow from all
  
  ProxyPass / http://www.namran.net/
  ProxyPassReverse / http://www.namran.net/


Then restart the httpd.

And re-test.

Namran Hussin: a soft spoken guy... with exceptional interest in computers and technology. I love to learn new thing and also love to break thing for the sake of learning.. but I do abide to the self-imposed limitation or certain thing such as social thing in life, thing can be done and thing that must be avoided at whatever cost such as drug,illegal tracking, smoke,illicit activity..etc.muahahaha let's share what we had in this short term of the life.! make it worth of the living.~
Related Post
Leave a Comment