Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- location / {
- try_files $uri $uri/ @extensionless-php;
- }
- location /shop {
- try_files $uri $uri/ /shop/index.php?q=$uri&$args /shop/index.php?q=$uri&$args;
- }
- location ~ .php$ {
- if ($request_uri ~ (.*).php$)
- {
- return 301 $1;
- }
- try_files $uri =404;
- include /etc/nginx/fastcgi.conf;
- fastcgi_pass unix:/run/php/php7.0-fpm.sock;
- }
- location @extensionless-php {
- rewrite ^(.*)$ $1.php last;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement