문제

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!

도움이 되었습니까?

해결책

In the .htaccess file, just add

ErrorDocument 401 /401.html

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top