I’m writing a CMS in PHP, and now I’m working at the themes feature. I have a .htaccess file:
RewriteEngine ON
RewriteRule ^([a-zA-Z][a-zA-Z0-9]*)$ index.php?m=$1
RewriteRule ^([a-zA-Z][a-zA-Z0-9]*)/(.+)$ index.php?m=$1&p=$2
If I have a request to:
/page
it must load the view function of the class called page.
If I have a request to:
/page/test
it must load the view function of the class called page, with the parameter ‘test’.
This all works,
But I want it to apply the RewriteRules ONLY if the request does NOT start with:
/THEMES/
So I can apply CSS styles etc…
Can anyone help me? Thanks.
You could use an additional rule to stop the rewriting process: