A few lines of .htaccess: mod_rewrite non-existant *.html files
$30-60 USD
Closed
Posted about 20 years ago
$30-60 USD
Paid on delivery
I stored all *.html files for some domains in a non-web-accessible folder which is also not the apache document root.
I need to let these *.html pages where they are, but still want to serve them with Apache, without revealing any redirection to the public (no 404 or other error/redirect/moved messages in the header)
Example
[login to view URL]
does not exist.
Apache serves it nonetheless (without 404 or other error messages) by rewriting the whole part after [login to view URL] internally to
/full/path/to/somedirectory/NON/EXISTING/[login to view URL]
In case the *.html file doesn't exist in that other location (/full/path/to/somedirectory/NON/EXISTING/[login to view URL]) either, then I'd expect it to just serve the standard 404 page
This .htaccess should cover all missing .html files only.
## Deliverables
Fully-functional .htaccess file based on mod_rewrite, working on both Apache 1.3 and Apache 2.0
## Platform
Linux and Apache 1.3 & 2.0