Announcement

Collapse
No announcement yet.

How To Redirect To www Using .htaccess?

Collapse

Unconfigured Ad Widget

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How To Redirect To www Using .htaccess?

    You may be in a need to redirect all requests coming to your domain name domain.com to www.domain.com. For Linux based hosting, you can write following redirect rule in .htaccess file. Please make sure that Apache Mod-Rewrite module should be enabled in Linux server to make this working :

    Options +FollowSymlinks
    RewriteEngine on
    rewritecond %{http_host} ^domain.com [nc]
    rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

    Note: Make sure you replace domain.com and www.domain.com with your actual domain name.

    Accuwebhosting.com
    admin
    Administrator
    Last edited by admin; 07-24-2015, 10:29 AM.
Working...
X

Sign up for a News Letter Click here to sign up