簡體   English   中英

nginx配置三種.php文件

[英]nginx configuration for three types of .php files

我有三種類型的 url 像這樣:

http://log.cb.gq/index.php/creative-thinking-workshop-de

http://log.cb.gq/work.php/creative-thinking-workshop-de

http://log.cb.gq/cat.php/creative-thinking-workshop-de

和 nginx conf 是這樣的

location / {
            try_files $uri $uri/ /index.php$is_args$args;
            #rewrite ^/([a-zA-Z0-9]+)/?$ /index.php?$1;
    }

並且只有第一個 url 即 index.php 工作。 我怎樣才能使這三個工作

位置 / { try_files $uri $uri/ /index.php$is_args$args; }

位置 /work.php { try_files $uri $uri/ /work.php$is_args$args; }

位置 /cat.php { try_files $uri $uri/ /cat.php$is_args$args; }

這對我有用

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM