.htaccess redirect don’t render page properly

I am facing a wired issue..
during maintenance time, i tried to redirect all request to maintenance page. (maintenance.html).

But the problem is when i visit that page directly it shows properly (honor css/styles) but when htaccess/server redirect to that page it doesn’t show/honor the styles 🙁

i have searched here and some one told to change css path from “css/styles.css” to “/css/styles.css” but that even didn’t work 🙁

here is my .htaccess file:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/maintenance.html$
RewriteRule ^(.*)$ /maintenance.html [R=307,L]

Here is how it looks when i visit the page directly:
enter image description here

And Here what it looks like if it is redirected by server/.htaccess file:
enter image description here

i hope that makes sense and also that’s not very hard to solve.. all i just can’t figure it out 🙁


Source: .htaccess

Leave a Reply