![]() |
| Domain Name Sales | Domain Software | Calculate UK Domain Drop Dates | Domain Registration | NameDrive | Domain Parking | Subscribe to our Domains For Sale newsletter |
| | ||||||
| Home | Register | Rules | Membership Upgrade | Domains For Sale | Domain Name Escrow | Mark Forums Read | Domain Classified | Chat Room |
| Scripts and Coding PHP, MySQL, scripts |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) | |
![]() Join Date: Oct 2008 Location: County Cork Republic of Ireland
Posts: 4,181
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Domain Trader Rating: (100% / 106) | htaccess help
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: Quote:
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.
__________________ For Sale sat.co.uk - pda.co.uk | |
| |
| | #2 (permalink) | |
![]() |
No need to over complicate things. Just whack this code in a .htaccess file for each site. Simples. Quote:
| |
| |
| | #3 (permalink) |
![]() Join Date: Oct 2008 Location: County Cork Republic of Ireland
Posts: 4,181
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Domain Trader Rating: (100% / 106) |
Thanks Mat, I've added that, will now flush dns/clear cache and see what happens.
__________________ For Sale sat.co.uk - pda.co.uk |
| |
| | #4 (permalink) |
![]() Join Date: Oct 2008 Location: County Cork Republic of Ireland
Posts: 4,181
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Domain Trader Rating: (100% / 106) |
Cleared my cache, ran CCleaner, and then ran ipconfig /flushdns, when I go to animalwelfare.org.uk it still doesn't redirect to www.animalwelfare.org.uk ![]() That snippet of code you gave, I don't need to add any domain names in to that do I?
__________________ For Sale sat.co.uk - pda.co.uk |
| |
| | #5 (permalink) |
![]() |
That bit of code is all you need, without the www works for me.
|
| |
| | #6 (permalink) |
![]() Join Date: Oct 2008 Location: County Cork Republic of Ireland
Posts: 4,181
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Domain Trader Rating: (100% / 106) |
@ Tricky, do you mean if you paste animalwelfare.org.uk in to your browser, it then redirects and shows the www. before the url? It doesn't do that for me, unless I'm understanding redirecting incorrectly, I thought that it was supposed to automatically changed the url to www.animalwelfare.org.uk if I went to the site without adding the www., no?
__________________ For Sale sat.co.uk - pda.co.uk Last edited by Systreg; 17-01-2012 at 04:22:59 AM. |
| |
| | #7 (permalink) |
![]() |
Doesn't redirect for me. In your first example you have a spurious "\" before the org.uk on line 3. Try removing that and delete last two lines I think you main problem is the .htaccess file NEEDS to be lowercase not .HTACCESS http://animalwelfare.org.uk/.HTACCESS Should not display anything ! Last edited by redbird; 17-01-2012 at 08:31:14 AM. |
| |
| | #8 (permalink) | |
![]() Join Date: Oct 2008 Location: County Cork Republic of Ireland
Posts: 4,181
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Domain Trader Rating: (100% / 106) | Quote:
__________________ For Sale sat.co.uk - pda.co.uk | |
| |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Domain Name Community | Replies | Last Post |
| Quick htaccess redirect question | Rob_F | Scripts and Coding | 7 | 12-11-2011 04:21:36 PM |
| Permanent redirect htaccess? 301? 2001?! | fish | Scripts and Coding | 6 | 17-03-2011 08:39:12 PM |
| htaccess guru needed | SecNam | Website Design | 7 | 13-11-2010 11:40:01 PM |
| htaccess redirect question... | mat | Website Design | 5 | 01-07-2010 09:46:57 AM |
| (help) htaccess WWW | purg | General Board | 2 | 19-01-2009 10:05:25 PM |