I need some rewrite rules for NGINX / Apache (currently working on NGINX but depending on my boss it will probably later be changed to Apache).
The rules should make the server interpret URL's like those:
https://domain.tld/signinhttps://domain.tld/hello/worldhttps://domain.tld/user/john/doe
As this:
https://domain.tld/index.php?lvl1=signinhttps://domain.tld/index.php?lvl1=hello&lvl2=worldhttps://domain.tld/index.php?lvl1=user&lvl2=john&lvl3=doe
(or something similar, it doesn't have to be lvl1, lvl2, lvl3... but something I could work with).
There are two problems I'm also facing:
- File paths beginning with a
/static/
directly after the domain, should be excluded to deliver linked CSS, JS, PDF, images, videos... in the HTML file properly. - Regular GET parameters should still be working as if they have not been touched. An URL like
/foo/bar?action=edit
should still be interpreted as/lvl1=foo&lvl2=bar&action=edit
Is there someone that could help me with those rules for NGINX as well as Apache? I've searched quite a while, but did not come across a satisfying solution.