Skip to content

Commit 98e09a1

Browse files
author
Arturo Blanco
authored
Update prestashop.stpl
Change if by try_files
1 parent 05aead4 commit 98e09a1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

install/deb/templates/web/nginx/php-fpm/prestashop.stpl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,15 @@ server {
105105
}
106106

107107
location / {
108-
if (!-e $request_filename)
109-
{
110-
rewrite ^(.+)$ /index.php?q=$1 last;
111-
}
108+
try_files $uri $uri/ /index.php?$args;
112109

113110
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
114111
expires 30d;
115112
fastcgi_hide_header "Set-Cookie";
116113
}
117114

118115
location ~ [^/]\.php(/|$) {
116+
try_files $fastcgi_script_name /index.php$uri&$args =404;
119117
fastcgi_split_path_info ^(.+\.php)(/.+)$;
120118
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
121119
if (!-f $document_root$fastcgi_script_name) {

0 commit comments

Comments
 (0)