Chris Stark
Chris Stark

Reputation: 11

403 redirects doesn't work but 404 does. What's wrong, what can I do?

First post around here !

I'm currently working on a website with Wamp and I am having an issue with 403 redirects. I would like to redirect all these 403 errors to a custom page. In my .htaccess (the file is in www/project with my index.php) I have this two lines:

ErrorDocument 404 /project/views/error.php
ErrorDocument 403 /project/views/error.php

The thing is the 404 errors are perfectly redirected to the error.php page so it seems the path to the custom page is correct but it doesn't work for the 403 errors and still displays me the Apache default error page :

Forbidden You don't have permission to access (a URL that return 403) on this server.

Please can you help me to understand what's happening because I really dont know why it doesn't work and I've seen lot of similar questions but no good answers yet.

Thank you

Upvotes: 0

Views: 290

Answers (0)

Related Questions