Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rewrite ^([^.]*[^/])$ $1/ permanent;
- location ~ ./$ { rewrite ^(.+)/$ $1 last; }
- location / {
- try_files $uri $uri.htm @extensionless-php;
- }
- location @extensionless-php {
- rewrite ^(.*)$ $1.php last;
- }
- location ~ \.php$ {
- try_files $uri $uri.php $uri/index.php =404;
- fastcgi_pass unix:/run/php/php7.0-fpm.sock;
- include /etc/nginx/fastcgi_params;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /root/directory$fastcgi_script_name;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement