Therefore, I use the following to force my site into maintenance mode when updating some things:
# MAINTENANCE-PAGE REDIRECT <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REMOTE_ADDR} !^23\.1\.12\.167 RewriteCond %{REQUEST_URI} !/maintenance.html$ [NC] RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC] RewriteRule .* /maintenance.html [R=302,L] </IfModule>
This worked fine, but now I have a situation where in maintenance mode I want to exclude the transfer of a specific directory to the maintenance.html file and, rather, show their normal contents.
So it would be something like:
root/ .htaccess maintenance.html index.html everything.else.html /do_not_display_me /display_me_always
Not sure if this is possible from the root .htaccess level, or if I need to handle sub-dir.htaccess files, any help would be appreciated.
source share