I'm attempting to create a version of .htaccess for when my site needs any sort of downtime (for database upgrades, etc). Part of want I want is to still allow access to directories, image files, CSS files, favicon, and the blog. Additionally, I want to allow access to static pages, which in this case would be anything within "example.com/pages/whatever". "pages" is not a directory on the server; instead, it is parsed by my index.php file, as instructed on the last line of this .htaccess file. My problem is that even when accessing "pages/anything_here", I still get redirected to downtime.html, and I can't figure out why. Could someone help fix my code? <IfModule mod_rewrite.c> RewriteEngine On # remove www from url RewriteCond %{HTTP_HOST} !^example.com$ [NC] RewriteRule ^(.*)$ http://example.com/$1 [R,L] # users not coming from my IP address should be redirected to downtime.html # continue to allow access to images, css files, blog, and static pages RewriteCond %{REMOTE_ADDR} !^xxx.xxx.xxx.xxx$ [NC] [b]RewriteCond %{REQUEST_URI} !^/*downtime.html$|favicon.ico$|css|img|blog|pages[/b] RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ downtime.html [L] # standard cakephp redirection RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] </IfModule> Code (markup):