Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5054

NGINX / Apache rewrite rules

$
0
0

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:

  1. 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.
  2. 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.


Viewing all articles
Browse latest Browse all 5054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>