Systreg
Staff member
- Joined
- Oct 13, 2008
- Posts
- 8,114
- Reaction score
- 666
Hi, can anyone offer some help with a non redirecting problem I have, every time I upload a new html site to HostGator, the site only works without the www. in front of it.
A while back when I had the same problem, someone gave me this to use for an .HTACCESS file for a domain:
Does all of that text in the quote go in the HTACCESS file?
I used that on the previous site but it did nothing, if I went to animalwelfare.org.uk, it wouldn't redirect to www.animalwelfare.org.uk, so I removed the HTACCESS file, now it works with either but doesn't redirect from non www. to the www.
The same site I uploaded to HostGator this evening only shows the site at the non www. but not if I go to the www. version.
A while back when I had the same problem, someone gave me this to use for an .HTACCESS file for a domain:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^animalwelfare\.org.uk [NC]
RewriteRule (.*) http://www.animalwelfare.org.uk/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^.*/index.html
RewriteRule ^(.*)index.html$ http://www.animalwelfare.org.uk/$1 [R=301,L]
Does all of that text in the quote go in the HTACCESS file?
I used that on the previous site but it did nothing, if I went to animalwelfare.org.uk, it wouldn't redirect to www.animalwelfare.org.uk, so I removed the HTACCESS file, now it works with either but doesn't redirect from non www. to the www.
The same site I uploaded to HostGator this evening only shows the site at the non www. but not if I go to the www. version.