user3303540
user3303540

Reputation: 1

Add Folder Exception to htaccess File

I currently use the following .htaccess file that redirects every page on my site to the index.php page.

I would like to make an exception for my /images/ folder and all the files in it.

How can I ignore all of the files in that folder? Thanks.

RewriteEngine On
RewriteRule ^.*/$ /index.php [QSA]
RewriteRule ^.* index.php

Upvotes: 0

Views: 1015

Answers (1)

ImadOS
ImadOS

Reputation: 425

try this instead of your :

RewriteEngine On
RewriteRule ^(images)($|/) - [L]
RewriteRule ^.*/$ /index.php [QSA]
RewriteRule ^.* index.php

or just create a new .htaccess file in the images derectory with this line in it :

RewriteEngine Off

Upvotes: 1

Related Questions