tuscan88
tuscan88

Reputation: 5839

expression engine htaccess rewrite that excludes admin.php

I am using Expression Engine and have a rule in my htaccess to rewrite urls so that the index.php portion of the url is removed. However this then stops the admin area working for some reason which uses admin.php to route everything through. This is the contents of my htaccess:

RewriteEngine on 
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

Does anyone know how to prevent this rules being applied to admin.php?

Upvotes: 0

Views: 277

Answers (1)

Denys Séguret
Denys Séguret

Reputation: 382464

The RewriteCond line specifies the filter.

RewriteEngine on 
RewriteCond $1 !^(index\.php|admin\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

See RewriteCond (I won't pretend it's simple...)

Upvotes: 3

Related Questions