blob: 814bea91d6c2023eec867c871e938eb88fee86cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# nginx configuration rules [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# #
# This file contains the configuration from the Apaches .htaccess file written #
# for the nginx high performance web server. Put the content of this file into #
# the "server {}" block of your nginx virtual host configuration file. #
# #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
#===============================================================================
# Error documents
#===============================================================================
error_page 403 /system/403.php;
error_page 404 /system/404.php;
#===============================================================================
# Forbidden directories
#===============================================================================
location ~ ^/core|template/(.*)/(html|lang)/ {
return 403;
}
#===========================================================================
# Main rules
#===========================================================================
rewrite ^/(page|post|user)/([^/]+)/$ /system/$1/main.php?param=$2 break;
rewrite ^/(page|post|user)/$ /system/$1/list.php break;
rewrite ^/feed/(page|post)/$ /system/feed/main.php?item=$1 break;
rewrite ^/(feed|search)/$ /system/$1/main.php break;
#===========================================================================
# Trailing slashes
#===========================================================================
rewrite ^/(page|post|user)/([^/]+)$ /$1/$2/ redirect;
rewrite ^/(page|post|user|feed|search)$ /$1/ redirect;
rewrite ^/feed/(post|page)$ /feed/$1/ redirect;
|