The server has been running around for a long time.
The environment is also exchanged for several
Apache and nginx;
Always environment problems
Tested, 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? File = $1 last; If (! -E $ request_filename ){ Rewrite ^. +? (/Wp-. *) $1 last; Rewrite ^. +? (/. *. Php) $1 last; Rewrite ^/index. php last; } |
Insert the above code into the server {…} of/usr/local/nginx/conf/nginx. conf {...} Or you can add them in other ways.
Restart nginx (/etc/init. d/nginx restart) to take effect.
If the space uses a Linux + Apache environment and supports writing. htaccess files, the pseudo-static state can be implemented as long as it is set in the WP background. If the. htaccess file cannot be automatically written, you must manually configure the. htaccess file.
The code is as follows: |
Copy code |
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase/ RewriteCond % {REQUEST_FILENAME }! -F RewriteCond % {REQUEST_FILENAME }! -D RewriteRule./index. php [L] </IfModule> |
If you are using a Windows + IIS system, the pseudo-static method is to configure the web. config file. In This server environment, the WordPress pseudo-static method is applicable to systems that support aspx.
The code is as follows: |
Copy code |
<? Xml version = "1.0 & Prime; encoding =" UTF-8 & Prime;?> <Configuration> <System. webServer> <Rewrite> <Rules> <Rule name = "wordpress" patternSyntax = "Wildcard"> <Match url = "*"/> <Conditions> <Add input = "{REQUEST_FILENAME}" matchType = "IsFile" negate = "true"/> <Add input = "{REQUEST_FILENAME}" matchType = "IsDirectory" negate = "true"/> </Conditions> <Action type = "Rewrite" url = "index. php"/> </Rule> </Rules> </Rewrite> </System. webServer> </Configuration> |