Wordpress-通过HTACCESS忽略目录

Wordpress-通过HTACCESS忽略目录,wordpress,.htaccess,Wordpress,.htaccess,我一直试图(未成功)忽略Wordpress站点根目录中的一个目录。无论我做什么,它似乎只是显示404页的这些页面。下面是我尝试忽略/下注报告的HTACCESS规则/ 开始WordPress 重新启动发动机 重写基/ 重写cond%{REQUEST_URI}^/(下注报告|下注报告/*)$ 重写规则^index\.php$-[L] 重写cond%{REQUEST_FILENAME}-F 重写cond%{REQUEST_FILENAME}-D 重写规则/index.php[L] #结束WordPr

我一直试图(未成功)忽略Wordpress站点根目录中的一个目录。无论我做什么,它似乎只是显示404页的这些页面。下面是我尝试忽略/下注报告的HTACCESS规则/

开始WordPress

重新启动发动机
重写基/
重写cond%{REQUEST_URI}^/(下注报告|下注报告/*)$
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/index.php[L]
#结束WordPress
RewriteCond%{HTTP_HOST}^doawildthing.com$[或]
重写cond%{HTTP_HOST}^www.doawildthing.com$
重写规则^/?$“http\:\/\/wildthingfootball\.com\/”[R=302,L]
感谢您的帮助

请尝试以下代码:

<Directory "/bet-reports/">
Deny from all
</Directory>

全盘否定
试试这个:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/(bet-reports.*)$
RewriteRule . /someotherpage.html [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

重新启动发动机
重写基/
重写条件%{REQUEST_URI}^/(下注报告。*)$
重写规则/someotherpage.html[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/index.php[L]

嗨,菲尔——我刚试过这个,它仍然在做同样的事情。嗨,布莱恩,我更新了我的答案,你能试试吗。现在它将重定向/bet reports/到其他页面。htmlHey,Lucas。我试过这个,但似乎不起作用。它应该去哪里?
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/(bet-reports.*)$
RewriteRule . /someotherpage.html [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>