Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache 如何通过.htacess允许特定文件夹及其文件_Apache_.htaccess - Fatal编程技术网

Apache 如何通过.htacess允许特定文件夹及其文件

Apache 如何通过.htacess允许特定文件夹及其文件,apache,.htaccess,Apache,.htaccess,我得到了以下.htacess文件: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> #

我得到了以下.htacess文件:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
#开始WordPress
重新启动发动机
重写基/
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/index.php[L]
如何通过.htaccess允许以下目录及其文件:


/var/www/html/orangejuice/www/wp-content/themes/dreamtheme/iframes有几种方法。一个简单的方法是将有问题的目录添加到第一个重写规则中以将其排除:

RewriteRule ^index\.php$|themes/dreamtheme/iframes/.* - [L]
在新浏览器中以匿名模式进行测试