<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /opt/data/www/example.com
ServerName example.com
ServerAlias www.example.com
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com$ [NC]
RewriteRule (.*) http://www.example.com$1 [R=301,L]
CustomLog /var/log/httpd/example.com_access.log combined
</VirtualHost>
Refer for more :
https://my.bluehost.com/cgi/help/htaccess_redirect
http://httpd.apache.org/docs/current/rewrite/proxy.html
No comments:
Post a Comment