Link to home
Start Free TrialLog in
Avatar of beer9
beer9Flag for India

asked on

Require rewrite rule for maintaince page

Hello, I am using below ReWrite rule to get the maintainence page whenever there is file named maintenance_mode in the DOCUMENT_ROOT. It works fine but I any reference to "a href" for img and css doesn't work and all of them is getting forwarded to /sitedown.html. Appreicate if someone can help in fixing it. Thanks!

RewriteCond %{DOCUMENT_ROOT}/maintenance_mode -f
RewriteRule ^.*$    /sitedown.html [L]

Open in new window

Avatar of Steve Bink
Steve Bink
Flag of United States of America image

Change your ruleset as follows:
RewriteCond %{DOCUMENT_ROOT}/maintenance_mode -f
RewriteRule ^\.html?$    /sitedown.html [L]

Open in new window

Avatar of beer9

ASKER

I am getting a redirection loop because of above
ASKER CERTIFIED SOLUTION
Avatar of Steve Bink
Steve Bink
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial