regex - Apache mod_rewrite only if request does not start with '/THEMES/' -


I am writing a CMS in PHP, and now I am working on theme features. I have an .htaccess file:

  RiverEngineOnOrvrite Rule ^ ([a-zA-Z] [a-zA-Z0- 9] *) $ index.php? M = $ 1 rewrite ^ ([A-zA-Z] [a-zA-Z0- 9] *) / (. +) $ Index.php? M = $ 1 and P = $ 2  

If I have a request for this:

  / page  

It needs to load the view function of the class named page.

If I have a request for this:

  / page / test  

with parameter 'test', this page It does all this work,

but if this request begins with no :

  / Themes /  

then I can apply CSS styles etc ...

Can anyone help me? Thank you.

You can use an additional rule to stop the rewriting process:

  RewriteRule ^ THEMES / - [L] RewriteRule ^ ([a-zA-Z] [a-zA-Z0- 9] *) $ index.php? M = $ 1 RewriteRule ^ ([a-zA-Z] [A-zA-Z0- 9] *) / (. +) $ Index.php? M = $ 1 and P = $ 2  

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -