-1

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?$ ./
Warren Sergent
  • 2,542
  • 4
  • 36
  • 42

1 Answers1

0

Use sample rewrite rule will look like this:

RewriteEngine On

RewriteRule ^directory/?$ /directory/page/

This way each time someone accesses:

http://xyzdomain00.com/directory

the actual content that will be displayed will be for:

http://xyzdomain00.com/directory/page

Warren Sergent
  • 2,542
  • 4
  • 36
  • 42