Nginx don';t重写某些URL';s
现在,我正在使用将所有http请求重写到Page.phpNginx don';t重写某些URL';s,nginx,rewrite,Nginx,Rewrite,现在,我正在使用将所有http请求重写到Page.php rewrite ^ Page.php last; 但我想允许直接从/Ajax/文件夹访问文件。 我尝试添加(在开始时) 但仍然登录到Page.php 有没有办法写出这样的东西 rewrite ^/Ajax/ - last; ?您可以尝试: rewrite ^(?!(/Ajax/))(.*)$ /Page.php last; rewrite ^(?!(/Ajax/))(.*)$ /Page.php last;
rewrite ^ Page.php last;
但我想允许直接从/Ajax/文件夹访问文件。
我尝试添加(在开始时)
但仍然登录到Page.php
有没有办法写出这样的东西
rewrite ^/Ajax/ - last;
?您可以尝试:
rewrite ^(?!(/Ajax/))(.*)$ /Page.php last;
rewrite ^(?!(/Ajax/))(.*)$ /Page.php last;