How do I auto-redirect my domain to www?

To redirect your domain from http://mydomain.com to http://www.mydomain.com, add the following code to your .htaccess file:

RewriteCond %{HTTP_HOST} !^www\.mydomain\.com [NC]
RewriteRule ^(.?)$ http://www.mydomain.com/$1 [R=301,L]

Was this answer helpful?

Also Read
Why do I get "Internal Server Error"?

When you are browsing a .html (or .php) file in your account, you may sometimes see an error page...

How do I access my hosting account thru SSH?

If you are an expert Linux user, then you may love to use SSH to manage your hosting account. To...

Does your hosting support FFmpeg?

Yes, ALL the Web Hosting plans at GigaPros fully support FFmpeg. Now you can easily start a...

Where can I see your CPanel Demo?

We do have a CPanel demo for you that will give you a feel of using CPanel. Please remember that...

Where can I see your SiteBuilder Demo?

Click on the link below to launch GigaPros SiteBuilder Demo. Feel free to explore our...