Announcement

Collapse
No announcement yet.

How To Redirect To www Using .htaccess?

Collapse

Ads on showthread pages

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

  • How To Redirect To www Using .htaccess?

    WordPress Hosting on SSD Servers
    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
    Last edited by admin; 07-24-2015, 11:29 AM.
Working...
X
Sign up for a News Letter Click here to sign up