Skip to content

Nginx nginx xe 1.7.5.7 rewrite rule

2014.08.22 00:07

Kim 조회 수:12482

rewrite ^/(layouts|m.layouts)/(.+)/(.+).html$ /./index.php last;
if ($request_uri !~ /modules/editor/) {
rewrite ^/(skins|m.skins)/(.+)/(.+).html$ /./index.php last;
}
rewrite ^/(modules|addons|widgets)/(.+)/(conf|queries|schemas)/(.+).xml$ /./index.php last;
location ~ /(.+)/files/(member_extra_info|attach|cache|faceOff)/(.*) 
{
 try_files $uri /./files/$2/$3;
}
location ~ /(.+)/(files|modules|widgets|widgetstyles|layouts|m.layouts|addons)/(.*) 
{
 try_files $uri /./$2/$3;
}
rewrite ^/(rss|atom)$ /./index.php?module=rss&act=$1 last;
rewrite ^/([a-zA-Z0-9_]+)/(rss|atom|api)$ /./index.php?mid=$1&act=$2 last;
rewrite ^/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(rss|atom|api)$ /./index.php?vid=$1&mid=$2&act=$3 last;
rewrite ^/([0-9]+)/(.+)/trackback$ /./index.php?document_srl=$1&key=$2&act=trackback last;
rewrite ^/([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ /./index.php?vid=$1&document_srl=$2&key=$3&act=trackback last;
rewrite ^/admin/?$ /./index.php?module=admin last;
rewrite ^/([0-9]+)$ /./index.php?document_srl=$1 last;
location ~ /([a-zA-Z0-9_]+)/?$ 
{
 try_files $uri/ /./index.php?mid=$1$is_args$args;
}
rewrite ^/([a-zA-Z0-9_]+)/([0-9]+)$ /./index.php?mid=$1&document_srl=$2 last;
location ~ /([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/?$
{
 try_files $uri/ /./index.php?vid=$1&mid=$2$is_args$args;
}
rewrite ^/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)$ /./index.php?vid=$1&mid=$2&document_srl=$3 last;
rewrite ^/([a-zA-Z0-9_]+)/entry/(.+)$ /./index.php?mid=$1&entry=$2 last;
rewrite ^/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/(.+)$ /./index.php?vid=$1&mid=$2&entry=$3 last;


Powered by Xpress Engine / Designed by Sketchbook

sketchbook5, 스케치북5

sketchbook5, 스케치북5