$request _filename/index.html) {Rewrite (. *) $1/index.html break;}if (-f $request _filename/index.php) {Rewrite (. *) $1/index.php;}if (!-f $request _filename) {Rewrite (. *)/index.php;}Rename the file to the zblog.conf file and place it in the/usr/local/nginx/conf/directory and Add/modify the itbulu.com.conf file in
The server has been running around for a long time.The environment is also exchanged for severalApache and nginx;Always environment problemsTested, the following code is perfectly compatible with the pseudo-static rules of Nginx. The code is as follows:Copy code Rewrite ^. */files/(. *) $/wp-nodes des/ms-files.php?
The following is a personal nginx vhost configuration file that is added to the nginx rewrite rule for reference:
server {Listen 80;server_name 111cn.net www.111cn.net;Access_log/data/wwwlogs/111cn.net _nginx.log combined;Index index.html index.php duku.php;include/usr/local/nginx/conf/none.conf;Root/data/wwwroot/111c
Encountered problem: directive "rewrite" is not terminated by ";"
Cause analysis
Save after editing the nginx.conf file with the VI Editor, execute commands under the shell/usr/local/web/nginx/sbin/nginx-t to check
Nginx.conf the configuration file is correct (assuming Nginx is compiled to/usr/local/web/
Nginx allows Wordpress to support pseudo-static rules with fixed links
To make nginx support for WordPress fixed links very simple, you need to add Point configuration by yourselfCode:
Copy codeThe Code is as follows: Location /{
If (-F $ request_filename/index.html ){
Rewrite (. *) $1/index.html break;
}
If (-F
If your site is http://ningyuqiao.blog.51cto.com/site is built with Wordpres, you only need to add in the Nginx configuration file:location/{if (-f $request _filename/index.html) { rewrite ( . *) $1/index.htmlbreak;}if (-f $request _ filename/index.php) { rewrite (. *) $1/index.php;}if (!-f$ Request_filename) { rewrite
Configure discuz in Nginx! X3 pseudo-static, which can be implemented in the following three steps: Step 1. in the nginx configuration file, add: Sample Code: rewrite ^ ([^ \.] *)/topic -(. + )\. html $1/portal. php? Modtopictopic $2 last; rewrite ^ ([^ \.] *)/article -([
Nginx
Work in order to meet business needs and ensure the availability of services, the configuration of some nginx jump rules, and the company's business-related information has been erased, to provide hope for everyone to help.1. When the backend server has an exception and the response code is 500 501 502 503 504, the request is forwarded to a static downgrade server, which ensures that the business is not com
I phpcms v9 website host is Huaxia name NET, the server is nginx1.2.1, I in the custom pseudo static inside writes the pseudo static rule isRewrite ^tag/(. *) index.php?m=contentc=taga=liststag=$1 last;
But it doesn't work. Ask customer service, even pseudo static concept is not clear.
After some groping, the correct nginx of the pseudo static rules are:
The code is as follows
Copy Code
Recently studied the CI framework, found that the framework of the routing function under Nginx problems, reported 404 errors, and later on-line search information,
Discover the need to turn on path_info. After nginx7.16 seems to support the path_info, just need to open in the configuration file.
Open the Nginx.conf file and add the rewrite rules under your virtu
The blog that was written a few days ago has a bug that causes the background to be inaccessible and found 302 issues.http://ningyuqiao.blog.51cto.com/5581274/1615552For example: Website for Http://ningyuqiao.51cto.com/bloglocation/blog/{if (-F $request _filename/index.html) {rewrite (. *) $1/index.html break;}if (-f $request _filename/index.php) {rewrite (. *) $1/index.php;}if (!-f $request _filename) {
A recent study of the CI framework found that the routing function of this framework was problematic under Nginx, reported 404 errors, and later searched for information on the web,
Discover the need to open path_info. After nginx7.16 seems to support the path_info, just to open in the configuration file.
Open the Nginx.conf file and add the rewrite rules to your
case-sensitive, and other prefixes (including: "=", "^~" and "@") and no prefixes belong to normal location.To determine which location directive matches a particular query, the literal strings is checked first.For a specific HTTP request (a particular query), Nginx should match which location block's instruction (note: We typically define multiple location in the nginx.conf configuration file)? The matching rule is to match the normal location firs
: This article describes how to modify the rules for generating cahce keys in nginx. For more information about PHP tutorials, see. Aside from the logical deviation from the previous steps, modifying this key is not huge in terms of code volume. The cache contains proxy_cache and memcached in nginx, that is, file cache and memory cache. The file cache copies the
Location Matching command
~ #波浪线表示执行一个正则匹配, Case sensitive~* #表示执行一个正则匹配, Case insensitive^~ #^~ represents normal character matching, and if this option matches, matches only that option, and does not match the other options, typically used to match the directory= #进行普通字符精确匹配@ # "@" defines a named location, using internal orientation, such as Error_page, Try_files
The priority of location matching (regardless of the order in which location is in the configuration file)= Exact match will be pr
As the company recently in the Nginx related projects, research the location of the rules, the main reference to the blog post for Http://www.jb51.net/article/47761.htm, but the actual operation of their own, found some problems.The priority of location is thisAssume that the access path is 127.0.0.1/a/1.jpgThe priority is location =/a/1.jpg > Location/a/1.jpg > Location ^~/a/> Location ~*\.jpg$ > location/
Thank you, the author of the Spirit of sharing, the original address: http://www.nginx.cn/115.htmlLocation Matching command~ #波浪线表示执行一个正则匹配, Case sensitive~* #表示执行一个正则匹配, Case insensitive^~ #^~ represents normal character matching, and if this option matches, matches only that option, and does not match the other options, typically used to match the directory= #进行普通字符精确匹配@ # "@" defines a named location, using internal orientation, such as Error_page, Try_filesThe priority of location matching (
Location Matching command~ #波浪线表示执行一个正则匹配, Case sensitive~* #表示执行一个正则匹配, Case insensitive^~ #^~ represents normal character matching, and if this option matches, matches only that option, and does not match the other options, typically used to match the directory= #进行普通字符精确匹配@ # "@" defines a named location, using internal orientation, such as Error_page, Try_filesThe priority of location matching (regardless of the order in which location is in the configuration file)= Exact match will be proce
At present, domestic business-to-business website CMS program, relatively good and use more certainly is the Destoon program, before the old Chiang also used a period of time to build the industry's Business-to-business website, but due to energy, limited and then shut down. Today, another contact with the Destoon program is because a friend of the Web site Web environment is Nginx, before he used the Apache environment, pseudo static a little bit dif
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.