When my site is undergoing maintenence, I add the following to my htaccess file to redirect visitors to an offline message: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} !^/offline\.html$ RewriteRule ^(.*)$ http://www.mydomain.com/offline.html [R=307,L] Code (markup): It works fine unless the page uses a stylesheet, even though its located in the same folder as "offline.html". If the above rewrite is not added to my htaccess, the html page displays fine with the stylesheet. Is it possible to be able to use a stylesheet with such a page?
I don't think it is :S You could add your css to the offline.html page using the style tags. <head> <style type="text/css"> Your CSS here </style> </head> HTML:
what do you mean of adding this code to your site ،،،، http://engineering-sciences.blogspot.com The new at Engineering
This is because, to the web server, the stylesheet is just another request. Try this: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} !^/(offline\.html|style\.css)$ RewriteRule ^(.*)$ http://www.mydomain.com/offline.html [R=307,L] Code (markup):