I want to have te following URLs on my page:
www.domain.com/<module>/<function>/<query>=<string>/<query>=<string>/<query>=<string>
I know how to match the part with the module and function to valid urls like this:
www.domain.com/index.php?module=<module>&function=<function>
But I have no idea how I can append all those query=string-parameters to the query string.
I currently use RewriteRule ^([A-Za-z0-9_]+)/([A-Za-z0-9_]+)$ index.php?module=$1&function=$2 [NC]as my rule and would like to add those (optional and repeatable) query-string parts.
I hope someone knows more about htaccess and regexp than me xD
These rules need to be placed in .htaccess file in website root folder.
They will rewrite URL (internally) from this form
http://www.example.com/main/job/p1=value/p2=something+else/PP=yesinto this form
http://www.example.com/index.php?module=main&function=job&p1=value&p2=something+else&PP=yesThese rules need to be placed somewhere on the top of .htaccess — first rule uses
[N]flag which tells Apache to start rewriting from start again (in order to rewrite all<query>=<string>fragments). If you have a lot of rules before this one, Apache will have to “probe” each rule after each iteration, which may put unnecessary load on web server.