Actually I am trying to redirect all the 404 page to 404.php using .htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php [NC,L]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?localhost [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?localhost.*$ [NC]
RewriteRule \.(gif|jpg|css|js|png)$ - [F]
#for 404 page
Options +SymLinksIfOwnerMatch
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . 404.php [L]
my file structure is like structure
so what happens it works fine for the url like localhost/srmures/hr/fgh errorpageone
But when I change url like localhost/srmures/hr/fgh/gdj then it doesn't recognize the css file and add the html file into it.. errorpagetwo
So how to solve this?