Hello there,
i have a problem. i have 2 php files index.php & admin.php. I want to request the two files as follows:
index.php:
/index.php/welcome/index/...
/welcome/index/...
admin.php
/admin.php/welcome/index/...
/admin/welcome/index/...
My config:
root /usr/share/nginx/www/foobar/;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php;
}
location ~ .php/ {
rewrite ^(.*.php)/ $1;
}
if (!-d $request_filename) {
rewrite ^/(.+)/$ /$1 permanent;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/www/foobar;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}