Home > Backend Development > PHP Tutorial > Help nginx pseudo-static rules to apache

Help nginx pseudo-static rules to apache

WBOY
Release: 2016-09-21 14:12:56
Original
2877 people have browsed it

求助nginx伪静态规则转为apache规则

nginx伪静态规代码如下:

try_files $uri $uri/ /index.php?$query_string;

<code>        if (!-e $request_filename) { 
          rewrite  ^(.*)$  /?/$uri last;

        }
</code>
Copy after login
Copy after login

回复内容:

求助nginx伪静态规则转为apache规则

nginx伪静态规代码如下:

try_files $uri $uri/ /index.php?$query_string;

<code>        if (!-e $request_filename) { 
          rewrite  ^(.*)$  /?/$uri last;

        }
</code>
Copy after login
Copy after login

<code class="htaccess">RewriteEngine on
 RewriteCond %{REQUEST_FILENAME} !-d 
 RewriteCond %{REQUEST_FILENAME} !-f 
 RewriteRule ^(.*)$ /?/$1 [QSA,PT,L]</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template