cppit
cppit

Reputation: 4564

htaccess add redirect exception RewriteRule

here is my htaccess :

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_URI} !^public
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

what I am trying to do is to add an exception for the folder stat that way when I try to open it it doesn't redirect me to the home page. any suggestions/help please ?

Upvotes: 1

Views: 261

Answers (1)

anubhava
anubhava

Reputation: 786091

I am trying to do is to add an exception for the folder stat

You can try this rule:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_URI} !(public|stat)/ [NC]
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

Upvotes: 1

Related Questions