Using .htaccess file to redirect to www host
Posted on March 24th, 2008 by linux
Sometimes we would like to instruct apache to redirect all incoming visitors from our_sample_domain.com to www.our_sample_domain.com
to do this we need to amend .htaccess file as follows:
# RewriteCond %{HTTP_HOST} ^our_sample_domain.com\.com$ [NC]
# RewriteRule .* our_sample_domain.com/ [L,R=301]
Filed under: Administration, Linux, apache | No Comments »