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?

astaga
  • 1
  • 1
  • Try: `location = /kuery1.php { rewrite ^ /php/quer1.php last; }` – Richard Smith Oct 27 '21 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.. – astaga Oct 27 '21 at 14:36

0 Answers0