查找好友 首页

Oxwall Nginx Rewrite伪静态配置文件 | Forum

Topic location: 论坛首页 » 网站建设 » Oxwall
michael
michael 十二月 20 '16
Oxwall Nginx Rewrite伪静态配置文件

1、Oxwall Nginx Rewrite伪静态配置文件

vi /root/hi.173.net-rewrite.conf

#######################################################################

#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;
    }

会员