Sign in to follow this  
ManaStone

[web] Using .htaccess

Recommended Posts

ManaStone    148
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
Sander    1332
- 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
ManaStone    148
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
Sander    1332
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this