Results 1 to 6 of 6
Hi. I'm trying to get a custom 404 to work on Apache. I have done the following:
1) I made a plain text document called .htaccess and put it into ...
- 02-27-2005 #1Just Joined!
- Join Date
- Feb 2005
- Posts
- 9
.htaccess has no effect on Apache
Hi. I'm trying to get a custom 404 to work on Apache. I have done the following:
1) I made a plain text document called .htaccess and put it into the root of my web accessable directory ( /var/www/htdocs on my slackware box ). The .htaccess document contains the following line
I then made the special 404 file and put it into /var/www/htdocs/errors/ After I did that, in my browser typed in a non-existent file-name in my domain into the location bar, I still got the regular default apache 404:ErrorDocument 404 /errors/404.html
2) I then read some more docs and learned that I need to tell httpd.conf to allow .htaccess to override its settings, which I did by making sure this was in my httpd.conf file:Not Found
The requested URL /3213 was not found on this server.
Apache/1.3.31 Server at ruby.cerealport.com Port 80
It still didn't work when I tested it in the browser.AllowOverride FileInfo
3) I asked a couple friends for help, we tried taking out the leading slash in the .htaccess file's relative URL, and that didn't work. We changed the note in httpd.conf to "AllowOverride All" and that didn't do anything. We tried a couple other oddball long-shot things that didn't work either.
4) I read this:
I did what it suggested and found nothing.http://apache-server.com/tutorials/A...-htaccess.html
.htaccess file doesn't seem to change anything
It's possible that the directory is within the scope of an AllowOverride None directive. Try putting a line of gibberish in the .htaccess file and force a reload of the page. If you still get the same page instead of an 'Internal Server Error' display, then this is probably the cause of the problem. Another slight possibility is that the document you're requesting isn't actually controlled by the .htaccess file you're editing; this can sometimes happen if you're accessing a document with a common name, such as index.html. If there's any chance of this, try changing the actual document and requesting it again to make sure you can see the change. this isn't happening.
Just to let you know, the webpage for the special 404 does work. You can see it at http://www.cerealport.com/errors/404.html
I have no idea why this isn't working. I'm pretty frustrated by this. If anybody has any tips or pointers they would be very appreciated.
- 02-27-2005 #2Just Joined!
- Join Date
- Feb 2005
- Location
- Your SQL Server
- Posts
- 95
i would change the AllowOveride to:
AllowOverride All
- 02-27-2005 #3Just Joined!
- Join Date
- Feb 2005
- Posts
- 9
I've already tried that, but thanks anyway.i would change the AllowOveride to:
AllowOverride All
- 02-27-2005 #4
umm did you restart the server after the changes to the config's?
~Mike ~~~ Forum Rules
Testing? What's that? If it compiles, it is good, if it boots up, it is perfect. ~ Linus Torvalds
http://loft306.org
- 02-28-2005 #5Just Joined!
- Join Date
- Feb 2005
- Posts
- 9
Wow. That was it. Thank you so much. You're rad.
Originally Posted by loft306
- 02-28-2005 #6
Nice 404 page makes me hungry.
hehe
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds


Reply With Quote
