Oxwall中文网

Flexible Social Community Software

Oxwall Nginx Rewrite伪静态配置文件

要在Nginx上安装Oxwall,需要先配置伪静态规则。

#RewriteCond %{REQUEST_URI} !^/index\.php
#RewriteCond %{REQUEST_URI} !/ow_updates/index\.php
#RewriteCond %{REQUEST_URI} !/ow_updates/
#RewriteCond %{REQUEST_URI} !/ow_cron/run\.php
#RewriteCond %{REQUEST_URI} !/e500\.php
#RewriteCond %{REQUEST_URI} !/captcha\.php
#RewriteCond %{REQUEST_FILENAME} (/|\.php|\.html|\.htm|\.xml|\.feed|robots\.txt|\.raw|/[^.]*)$  [NC]
#RewriteRule (.*) index.php

if ($uri !~ “^/index.php”){
set $rule 1$rule;
}
if ($uri !~ “/ow_updates/index.php”){
set $rule 2$rule;
}
if ($uri !~ “/ow_updates/”){
set $rule 3$rule;
}
if ($uri !~ “/ow_cron/run.php”){
set $rule 4$rule;
}
if ($uri !~ “/e500.php”){
set $rule 5$rule;
}
if ($uri !~ “/captcha.php”){
set $rule 6$rule;
}
if ($request_filename ~ “(/|.php|.html|.htm|.xml|.feed|robots.txt|.raw|/[^.]*)$”){
set $rule 7$rule;
}
if ($rule = “7654321”){
rewrite /(.*) /index.php last;
}

点赞