I have a customer that needed to be able to be able to upload static html files to there wpmu site. I edited the .htaccess and added a rewrite rule:
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.html)$ files\/$2 [L]
I think what I did was make anything ending in .html serve from the files directory for that blog. This is working.
However, after putting this in my custom 404 page no longer works for anything ending in .html
Any ideas?
Here's my full .htaccess. I have the ErrorDocument set in the apache configs rather than the .htaccess.
RewriteEngine On
RewriteBase /
#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ $1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
#Static HTML Rewrite Rule
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.html)$ files\/$2 [L]
RewriteRule . index.php [L]
<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>