Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

mod_rewrite in .htaccess to exclude a sub-directory.

Go to End

2 Posts   6358 Views


Community Member, 29 Posts

11 September 2008 at 9:09pm

I know this is not a silverstripe-specific issue, but someone may have struck this.

I am wanting to make a modification to the mod_rewrite rules in the .htaccess file to prevent re-write engine from operating inside a sub-directory.

The situation is that the silverstripe content is in my base directory, and I am operating phplist ( from a sub-directory.
The phplist application generally calls new pages in it's own directory with the directory name only, not a specific file name. (e.g. http;//<domain>/phplist//admin/?page=list )
These calls are unfortunately captured by the mod_rewite & a silverstripe page not found is returned.

I have tried various RewriteCond statements such as:
RewriteCond {REQUEST_URI} !^phplist
but don't seem to be able to get it right.


Community Member, 29 Posts

11 September 2008 at 10:10pm

Edited: 11/09/2008 10:12pm

Nothing like posting a question to sharpen the focus!

I have used the rule:

 RewriteCond %{REQUEST_URI} !/phplist* 

and it works fine!

The only drawback is that


works, but

doesn't ... the trailing slash is needed to get started.