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.
Leave a Comment