Reputation: 286
I'm new to htaccess, but I wanted to rewrite all urls coming to my webserver to index.php?params=$1, except the assets folder. I've tried something like this:
Options +FollowSymlinks
RewriteEngine on
RewriteRule !^assets($|/) index.php?params=$1 [NC]
But, when I use var_dump for the params variable, it returns an empty variable.
Thanks a lot
Upvotes: 1
Views: 78
Reputation: 785108
This should work:
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/(assets/|index\.php) [NC]
RewriteRule ^(.*)$ index.php?params=$1 [L,QSA]
Upvotes: 1