Online Tutorials & Training Materials |
Register Login

Call 410 Gone Page through .htaccess

|| || 0

Call 410 Gone Page through .htaccess


Change 404 error Page to 410 error page through .htaccess

1. open .htaccess file add 404 error page code

ErrorDocument 404 /404.php

this will call a 404.php page when a page not found error occur. 

2. Open 404.php file and add code

header( "HTTP/1.1 410 Gone" );

This will retuen 410 return code when a 401 error page got called.