improved nginx config

This commit is contained in:
SJ 2014-04-17 15:39:59 +02:00
parent db26a463d0
commit fcd67da6d3

View File

@ -23,13 +23,18 @@ server {
root html; root html;
} }
location ~ \.php$ { location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_pass 127.0.0.1:9000; fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params; include fastcgi_params;
} }
rewrite /search.php /index.php?route=search/search&type=simple; rewrite /search.php /index.php?route=search/search&type=simple;
rewrite /advanced.php /index.php?route=search/search&type=advanced; rewrite /advanced.php /index.php?route=search/search&type=advanced;
rewrite /expert.php /index.php?route=search/search&type=expert; rewrite /expert.php /index.php?route=search/search&type=expert;