|
| |
|
|
Starhugger
Posts: 529 Joined: 4/12/2005 Status: offline
|
Help!! htaccess problems - 8/4/2008 15:53:17
I am having problems getting my .htaccess to redirect 404 errors to my error page. I just changed webhosts and my new one (I just discovered, after waiting over 10 minutes on hold) does not offer a way to view or edit your .htaccess file. FP hides it too. So I'm using a combination of FP (to create and upload the error page, called 404.html), another html editor (to edit the .htaccess file, which it does reluctantly), and WS_FTP (to upload the modified .htaccess file to my root diretory). Geesh! But when I test it by typing in "mydomain.com/mytest.htm" expecting that it will bring up my error page, I get the generic Not Found page. Here's the .htaccess code: # -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.mydomain.com
AuthUserFile /home/account/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/account/public_html/_vti_pvt/service.grp
RedirectMatch permanent ^/goodies/*.*$ http://mydomain.com/marketplace/marketplaceindex.htm
RedirectMatch permanent ^/glossary/glossary_hijk.htm$ http://mydomain.com/glossary/glossary.htm
ErrorDocument 404 http://mydomain.com/404.html I would really, really, REALLY appreciate some help with this. ...Before I throw my computer out the window. Thanks in advance. Starhugger (who doesn't feel like hugging much of anything right now ...except someone who can help! )
|
|
|
|
Kitka
Posts: 2520 Joined: 1/31/2002 From: Australia Status: offline
|
RE: Help!! htaccess problems - 8/5/2008 0:16:50
Hi Starhugger, I have a couple of suggestions to try: quote:
I'm using a combination of FP (to create and upload the error page, called 404.html), another html editor (to edit the .htaccess file, which it does reluctantly) It'd be much safer to use Notepad to edit .htaccess rather than an html editor, which can add hidden formatting. Have you tried using the www version for the 404 URL? ErrorDocument 404 http://www.mydomain.com/404.html If that doesn't work try the relative path: ErrorDocument 404 /404.html Also, I can't understand why you would be using both 'Allow from all' plus 'Deny from all' here: <Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit> Surely one cancels out the other? In mine I use the following and everything works well: <Limit GET POST>
order allow,deny
allow from all
</Limit>
_____________________________
Kitka **It is impossible to make anything foolproof because fools are so ingenious.**
|
|
|
|
Kitka
Posts: 2520 Joined: 1/31/2002 From: Australia Status: offline
|
RE: Help!! htaccess problems - 8/5/2008 0:39:10
Hmmm - I just thought to test your two RedirectMatch rules - and neither of those are working. So if they worked properly on your old server, it could be that the new host doesn't allow individual websites to have their own .htaccess rules. In which case, none of my suggestions above will help - and there may be no way around it except changing hosts to one that allows .htaccess for individual sites.
_____________________________
Kitka **It is impossible to make anything foolproof because fools are so ingenious.**
|
|
|
|
Starhugger
Posts: 529 Joined: 4/12/2005 Status: offline
|
RE: Help!! htaccess problems - 8/5/2008 21:09:07
quote:
It'd be much safer to use Notepad to edit .htaccess rather than an html editor, which can add hidden formatting. Thanks Kitka, that's probably where the weird characters were coming from when I tried to edit it with Notepad initially. I've started again from scratch now. quote:
Have you tried using the www version for the 404 URL? If that doesn't work try the relative path: ErrorDocument 404 /404.html Actually, the code originally used the relative path and didn't work. Then I tried the www version, with no success. Then I tried without the www. Then I finally posted my SOS here. quote:
Also, I can't understand why you would be using both 'Allow from all' plus 'Deny from all' here: <Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit> Surely one cancels out the other? In mine I use the following and everything works well: <Limit GET POST>
order allow,deny
allow from all
</Limit> Thanks Kitka. I'm not sure where I got that from. My poor .htaccess has been through several incarnations and probably mutated along the way. I was on a Windows server for a year, which doesn't use this, and by the time I got back to a Linux server again, I had forgotten most of what I'd learned about .htaccess. So it's anyone's guess where that code came from. Thanks for mentioning it! quote:
Hmmm - I just thought to test your two RedirectMatch rules - and neither of those are working. So if they worked properly on your old server, it could be that the new host doesn't allow individual websites to have their own .htaccess rules. In which case, none of my suggestions above will help - and there may be no way around it except changing hosts to one that allows .htaccess for individual sites. No, the do allow modification of the .htaccess -- they just don't provide a way to do it; you have to know how on your own, it seems. I suspect it's just that the path is a bit different on the new server. I'll check with them. Again, thanks for pointing this out! I really hope I won't have to change again. They've already got a year's account prepaid from me, and it was hard enough to find these guys. I'm afraid I'm a rather "high maintenance" customer and I have a lot of particular features that I want in a webhost. If I could find 100% of those things in the same host, I'd be happy as a pig in ...well, you know. I had hoped these guys were tolerable in the things they fell short on, but I hadn't realized there was no .htaccess support, per se. Sigh... One last question: do you know what these lines are for?
AuthName www.evolvingdoor.ca
AuthUserFile /home/account/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/account/public_html/_vti_pvt/service.grp
I suspect I put them in there at some point and knew why, but I think I'm getting senile. Thanks a million for the help! Starhugger
|
|
|
|
Kitka
Posts: 2520 Joined: 1/31/2002 From: Australia Status: offline
|
RE: Help!! htaccess problems - 8/6/2008 0:40:39
quote:
I really hope I won't have to change again. They've already got a year's account prepaid from me, and it was hard enough to find these guys. I'm afraid I'm a rather "high maintenance" customer and I have a lot of particular features that I want in a webhost. If I could find 100% of those things in the same host, I'd be happy as a pig in ...well, you know. I had hoped these guys were tolerable in the things they fell short on, but I hadn't realized there was no .htaccess support, per se. Sigh... I hope you can get it sorted out with their support, it is a pain moving hosts. What are your special needs? Maybe someone here can suggest a good host that fits all your criteria? quote:
One last question: do you know what these lines are for? AuthName www.evolvingdoor.ca AuthUserFile /home/account/public_html/_vti_pvt/service.pwd AuthGroupFile /home/account/public_html/_vti_pvt/service.grp I suspect I put them in there at some point and knew why, but I think I'm getting senile. They are automatically put there when FrontPage extensions are installed on the server. If you are publishing using FrontPage http, you need them there. If you are using ftp, you can delete them. quote:
Thanks a million for the help! You are very welcome - although I don't know that I helped much.
_____________________________
Kitka **It is impossible to make anything foolproof because fools are so ingenious.**
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|