Ngnix support for PathInfo in weiphp (thinkphp)

Source: Internet
Author: User

Ngnix support for weiphp (thinkphp)

Added: Weiphp's server{

###

#定义变量 $path _info for storing pathinfo information

Set $path _info "";

#定义变量 $real _script_name, for storing real addresses

Set $real _script_name $fastcgi _script_name;

#如果地址与引号内的正则表达式匹配

if ($fastcgi _script_name ~ "^ (. +?\.php) (/.+) $") {

#将文件地址赋值给变量 $real _script_name

Set $real _script_name $;

#将文件地址后的参数赋值给变量 $path _info

Set $path _info;

}

#配置fastcgi的一些参数

Fastcgi_param script_name $real _script_name;

Fastcgi_param path_info $path _info;


###

}


App_debug of the Portal file index.php is set to True



Nginx Settings 403,404

Add in HTTP

# # # # 403, 403

Fastcgi_intercept_errors on;

Error_page 404 = https://www.sogou.com;

Error_page 403 = https://www.so.com;

##########



Disable IP address access (added in server)

Listen default_server;

# # # Disable IP access

server_name _;

rewrite ^ https://www.baidu.com;

####

Reference:

Http://www.thinkphp.cn/topic/3138.html

http://blog.csdn.net/tinico/article/details/18033573

Http://www.nginx.cn/426.html

http://mp.weixin.qq.com/s?__biz=MzA5Njg1OTI5Mg==&mid=206012080&idx=1&sn= 6a61f06c3063b4723e8388f8f5a54784&3rd=mza3mdu4ntyzmw==&scene=6#rd


Ngnix support for PathInfo in weiphp (thinkphp)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.