TECHIES WORLD

For Techs.... Techniques.... Technologies....

ApacheCpanelLinux

How to exclude css/js files from htaccess redirection

While configuring htaccess redirection, css/js file get blocked which will lead the site to broken.

In such cases we should exclude css/js files from redirection.

We can use the following rule along with the other rules to acheive the same.

RewriteEngine on
RewriteCond %{REQUEST_URI} !(\.css|\.js)$ [NC]

 

That's all....

Leave a Reply