Adding redirect to preferred domain with WWW instead of without www.
Use the following .
<VirtualHost *:80>
ServerName www.namran.net
ServerAlias namran.net
RewriteEngine on
RewriteCond %{HTTP_HOST} ^namran.net(:80)?$
RewriteRule ^/(.*) http://www.namran.net/$1 [L,R=301]
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://www.namran.net/
ProxyPassReverse / http://www.namran.net/
</VirtualHost>Then restart the httpd.
And re-test.




No user commented in " Redirect without WWW to a WWW domain for Vhost. "
Follow-up comment rss or Leave a TrackbackLeave A Reply
Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">