I would like the following to happen:
When a visitor types an incorrect URL on my website, I would like it to redirect the visitor to a custom error page that I made. However I want the URL to show www.example.com
while the error page itself might be www.example.com/errorDocs/404.error
.
This is what I currently have but it does not work:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.example.com
ErrorDocument 403 RewriteRule ^http://www.example.com/errorDocs/403.html?$ ./
ErrorDocument 404 RewriteRule ^http://www.example.com/errorDocs/404.html?$ ./