1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pluxml_ynh.git synced 2024-09-03 20:16:02 +02:00

URL rewriting

This commit is contained in:
scith 2015-08-17 21:00:54 +02:00
parent 94f7d55cd9
commit 9a5aa047ca

View file

@ -13,12 +13,31 @@ location YNH_EXAMPLE_PATH {
fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param SCRIPT_FILENAME $request_filename;
} }
location YNH_EXAMPLE_PATH/data/images{ location ~ /\.ht {
deny all;
}
location YNH_EXAMPLE_PATH/version {
return 403;
}
location YNH_EXAMPLE_PATH/data/configuration/users.xml {
return 403;
}
location YNH_EXAMPLE_PATH/data/medias{
allow all; allow all;
break;
} }
location YNH_EXAMPLE_PATH/data { location YNH_EXAMPLE_PATH/data {
deny all; deny all;
return 403; return 403;
}
if (-f $request_filename) {
break;
}
# URL rewriting
if (!-e $request_filename) {
rewrite ^YNH_EXAMPLE_PATH/([^feed\/].*)$ YNH_EXAMPLE_PATH/index.php?$1 last;
rewrite ^YNH_EXAMPLE_PATH/feed\/(.*)$ YNH_EXAMPLE_PATH/feed.php?$1 last;
break;
} }
# Include SSOWAT user panel. # Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc; include conf.d/yunohost_panel.conf.inc;