I've developed a small (and powerful and lightweight :-D) php MVC Framework
the issue I'm currently having is: the routes follow this order
index.php?option=samplemodule&action=sampleController
That would link to a samplemodule and would execute the sampleController, pretty much as zf used to do a while ago.
I'm trying to get the .htaccess to rewrite the rules as /module/action
but for some reason it's not working, here's the piece of the code
RewriteEngine On # Turn on the rewriting engine
RewriteCond %{SCRIPT_FILENAME} -f
RewriteRule ^ - [L]
RewriteRule ^[A-Za-z0-9-]+/([A-Za-z0-9-]+)/?$ index.php?option=$1&action=$2 [NC,L]
RewriteRule ^[A-Za-z0-9-]+/([A-Za-z0-9-]+)?$ index.php?option=$1&action=$2 [NC,L]
RewriteRule ^([A-Za-z0-9-]+)/?$ index.php?option=$1&action=main [NC,L]
RewriteRule ^([A-Za-z0-9-]+)?$ index.php?option=$1&action=main [NC,L]
Dealing with regexes is quite difficult
i'd also like it to, when passing variables, these could be in the form of /module/action/var1/value1/var2/value2
but i'm not sure of how the rewrite pattern engine works.... does it use several rules recursively?