Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Rewrite to index.php on URI detection

$
0
0
Hi folks, I'm attempting to achieve something which is probably quite routine but it's really kicking my ass and i'd appreciate some guidance.

I have a single root directory lets call it /var/www/site/example.com with various different versions of the code living in subdirectories inside it. Like this:

/var/www/site/example.com/1-1-7
/var/www/site/example.com/1-1-8
/var/www/site/example.com/1-1-9

URI requests will always contain the subdirectory name and nginx should catch the request and rewrite it to index.php within the appropriate subdirectory.

For example if the request is www.example.com/1-1-8/getsessionkey the request should be rewritten to index.php within /var/www/site/examples.com/1-1-8/web/index.php

I've attached the nginx config i'm currently using, any assistance much appreciated.

Thanks!

Viewing all articles
Browse latest Browse all 4759

Trending Articles



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