0

i am not sure how to write the proper title
i have 5 ajax requests that gonna execute postgresql query in php

here is the directory

/var/www/webgis.com: 1. webgis.html 2. php(directory) -query1.php -query2.php -query3.php -query4.php -query5.php 3.etc 

the all previous ajax url is url: "php/query(N).php", i want to change it intourl: "query(N).php" without change my server directory
i use this script but doesn't work

location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; set $php_root /var/www/webgis.com/php; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $php_root$fastcgi_script_name; include /etc/nginx/fastcgi_params; } 

can somebody help me/ tell me what should i write?

2
  • Try: location = /kuery1.php { rewrite ^ /php/quer1.php last; } Commented Oct 27, 2021 at 14:21
  • sorry, my mistake. i already edit the question, i mean.. i want to remove "/php" directory in all url ajax request.. but without moving php script into parents directory.. Commented Oct 27, 2021 at 14:36

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.