如何使wordpress中的目录可以从Web访问

时间:2012-03-12 14:27:35

标签: wordpress .htaccess

我目前正在开发一个frankenstien wordpress网站,它包含了一些内容,包括需要从外部访问的不同的CMS,无需WP重写URL或其他任何内容。

我想要的是能够使用浏览器访问domain.com/myFolder并让它通过不受干扰(以及对该目录内任何内容的任何后续请求)。 其他任何事情都会得到正常的处理 - 例如,查看domain.com/2011-02-02/my-post上的帖子会提供帖子内容。

这是.htaccess文件wordpress目前正在使用:

# Switch rewrite engine off in case this was installed under HostPay.
RewriteEngine Off

SetEnv DEFAULT_PHP_VERSION 53

DirectoryIndex index.cgi index.php

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /domain.com/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /domain.com/index.php [L]
</IfModule>

# END WordPress

我至少不理解.htaccess,所以有人能指出我正确的方向吗?

1 个答案:

答案 0 :(得分:1)

您可以使用RewriteCond禁用myFolder的重写:

RewriteCond   %{REQUEST_URI}  !^myFolder/.*

或空白的RewriteRule:

RewriteRule ^myFolder/ - [L]

RewriteRule . /domain.com/index.php [L]

之前插入其中一条规则

由于我需要有关您的目录结构的更多信息,所以不确定路径。

相关问题