PDA

View Full Version : "404 Not Found" isn't working


mikesmullin
05-17-2006, 09:07 PM
I just paid for PHP Link Directory 3.04 and you can see it installed here:

http://www.soldin10days.biz/got2blike/

I see .htaccess file is configured to redirect 404 errors to index.php so it can handle clean or 'friendly' urls. I like friendly urls, but if a url doesn't exist I want them to get a 404 Not Found error.

Currently it doesn't work that way--if a page doesn't exist the main page is shown instead.

How can I change this to the desired behavior?

Boby
05-17-2006, 09:33 PM
Search your index.php file for this piece of code:
Content visible to registered users only.
Add this right after it:Content visible to registered users only.
This way it will still send a 404/Not Found header if the page does not exist and redirect to error.html
Use whatever filename you want, but change the PHP code to redirect to it.

Boby

mikesmullin
05-18-2006, 06:18 PM
That did the trick. Thanks very much for your timely response!