Welcome! Log In Create A New Profile

Advanced

Dynamic php path detection in URI

Posted by veurmiech 
Dynamic php path detection in URI
February 25, 2011 04:37AM
At the moment we are using apache as our php application webserver.
After hours of reading about replacing apache with nginx and reading advanced solutions, we can't find the answer for the following issue:

At the moment we are using SEO friendly url's which look like this (the php files have no extension) :
http://www.example.com/par1/par2/par3/par4

Two cases :

E.g : http://www.example.com/directory/script/par3/par4
Apache executes : <root_directory>/directory/script
Path_info : /par3/par4

E.g. : http://www.example.com/script/par2/par3/par4
Apache executes : <root_directory>/script
Path_info : /par2/par3/par4

Because Apache is able to scan the directories it is able to split the URI in the script path and the path_info.
In Nginx we can't find a methode to determ the realpath and pass it to the fastcgi php socket.
We tried complex regex functions on te uri but we cannot manage to loop the results using try_files of if statements.

Maybe we are taking the wrong aproach for the solution but can anyone advise us how to solve this issue.

Thanks
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 118
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready