我可以禁用改写为特定的目录?目录

2023-09-02 09:42:48 作者:爱我你怕了麽

我有使用CakePHP运行一个网站,我已经在WWW / application_test的aplication不使用重写规则的工作。

有一种方法来禁用在WWW / application_test?

目录规则

跟随我的.htaccess文件:

 < IfModule mod_rewrite.c>
   RewriteEngine叙述上

   重写规则^(。*)(应用程序| |蛋糕的厂商)/ $应用程序/ Web根目录/ $ 1 [L]

   重写规则^ $应用程序/ Web根目录/ [L]

   的RewriteCond%{} REQUEST_FILENAME!-d
   的RewriteCond%{} REQUEST_FILENAME!-f
   重写规则(。*)的应用程序/ Web根目录/ $ 1 [L]

< / IfModule>

< IfModule mod_ssl.c>
        #INCLUDE的conf / ssl.conf中
< / IfModule>
 

解决方案

广告这一行下方 RewriteEngine叙述在

 #忽略application_test任何重写
重写规则^ application_test(/ | $) -  [NC,L]
 
ipython使用方法 50 个 IPython 使用技巧 现在学还不晚

I have a website that runs with cakePHP, and i have an aplication in www/application_test that does not work using the rewrite rule.

There is a method to disable the rule for directories within www/application_test?

Follows my .htaccess file:

<IfModule mod_rewrite.c>
   RewriteEngine on

   RewriteRule    ^(app|cake|vendors)/(.*)$ app/webroot/$1 [L]

   RewriteRule    ^$ app/webroot/    [L]

   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteRule    (.*) app/webroot/$1 [L]

</IfModule>

<IfModule mod_ssl.c>
        #Include conf/ssl.conf
</IfModule>

解决方案

Ad this line just below RewriteEngine On line

# ignore application_test for any rewrites
RewriteRule ^application_test(/|$) - [NC,L]