Apache 如何通过.htacess允许特定文件夹及其文件
我得到了以下.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> #
# 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]
在新浏览器中以匿名模式进行测试