VPS侦探论坛

 找回密码
 注册
查看: 4899|回复: 4

不支持 thikphp 的 pathinfo模式

[复制链接]
发表于 2013-5-13 23:29:10 | 显示全部楼层 |阅读模式

不支持 thikphp 的  pathinfo模式   , 怎么个改配制文件。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2013-5-13 23:52:29 | 显示全部楼层


哪位哥能, 出招解决一下。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2013-5-14 08:54:29 | 显示全部楼层
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2013-5-15 14:28:45 | 显示全部楼层



不行呀。 老大。 还有别的弄法不。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2013-5-16 23:50:41 | 显示全部楼层

68                 location ~ .*\.php
     69                 {
     70                                 try_files $uri =404;
     71                                 fastcgi_pass  unix:/tmp/php-cgi.sock;
     72                                 fastcgi_index index.php;
     73                                 fastcgi_read_timeout 500;
     74                                 include fcgi.conf;
     75
     76                                 set $path_info "";
     77                                 set $real_script_name $fastcgi_script_name;
     78                                 if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
     79                                 set $real_script_name $1;
     80                                 set $path_info $2;
     81                                 }
     82                                 fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
     83                                 fastcgi_param SCRIPT_NAME $real_script_name;
     84                                 fastcgi_param PATH_INFO $path_info;
     85                 }
     86                 location /Admin/ {
     87                         if (!-e $request_filename){
     88                                 rewrite  ^/Admin/(.*)$  /Admin/index.php/$1  last;
     89                         }
     90                 }
     91                 location / {
     92                               if (!-e $request_filename) {
     93                                         rewrite  ^/(.*)$  /index.php/$1  last;
     94                                         break;
     95                                 }
     96                 }


加这段解决

不过还有一个问题:
ip:88    会丢失端口号码

军哥运维代购:http://shop63846532.taobao.com/

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-24 13:18 , Processed in 0.026707 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表