Redirect 401 "authorization required page" to custom page
Asked Answered
B

1

0

Is there a simple way I can encode a front-end php redirect to a custom page upon error?

I have a page in a directory protected by an .htaccess password, but if you cancel the system dialog or enter the wrong details, you get a plain html message in the browser and have to navigate back.

Would be great to have custom error pages as a solution to this.

Thanks!

Bon answered 10/5, 2013 at 9:47 Comment(0)
F
3

In the .htaccess file, just add

ErrorDocument 401 /401.html

And change 401.html to the name of the file you want to display.

Fabian answered 10/5, 2013 at 9:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.