Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. server {
  2. location / {
  3. try_files $uri $uri/ @extensionless-php;
  4. }
  5. location /shop {
  6. try_files $uri $uri/ /shop/index.php?q=$uri&$args /shop/index.php?q=$uri&$args;
  7. }
  8. location ~ .php$ {
  9. if ($request_uri ~ (.*).php$)
  10. {
  11. return 301 $1;
  12. }
  13. try_files $uri =404;
  14. include /etc/nginx/fastcgi.conf;
  15. fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  16.  
  17. }
  18. location @extensionless-php {
  19. rewrite ^(.*)$ $1.php last;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement