• Advertisement
Sign in to follow this  

[web] Using .htaccess

This topic is 4333 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

As I mentioned in an earlier thread, I just started doing PHP and web development related stuff. I don’t really know anything about security, but I’m going through a tutorial on .htaccess and I am trying to make is so that I go to a custom page when I try to go to a page that does exists. My .htaccess file looks like this: ErrorDocument 404 /errors/notfound.html This is in my htdocs folder from the xampp package I downloaded. The notfound.html file exists and it is just a message saying, “This is a test.” Instead of going to this page, it just goes to the default error 404 page when trying to access a non existing page. Anybody know what I could be doing wrong?

Share this post


Link to post
Share on other sites
Advertisement
- Does your host allow .htaccess files?
- Is it a *nix host? On Windows, it's htaccess instead of .htaccess (no dot)

Share this post


Link to post
Share on other sites
I'm just using localhost now. I don't even know what is involved to get my web stuff onto a real hosted server yet. I am using windows and removing the dot doesn't work either.

Share this post


Link to post
Share on other sites
Check your httpd.conf file then. You must explicitly enable reading of htaccess files. The default Apache installation doesn't allow it (Apache is part of xampp).

Share this post


Link to post
Share on other sites
I tried swtiching AllowOverride None to AllowOverride All and it still gets the default page. Is that what I was supposed to do?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement