我正在使用一个框架(zend 2)为我的网站;它使用html .access将所有URL请求重定向到索引页。
然而,我知道我想在网站上添加一个Wordpress博客。
我不希望博客主题到Zend模块,因此需要坐在网站内独立。这意味着它不受ht访问规则的约束。
因此,我希望所有的url都有一个目录的博客
。e www.sampleSite博客
不受任何访问规则的约束。
下面是我的HT访问规则。你会注意到所有的URL请求都被重定向到索引页。
RewriteEngine On
# The following rule tells Apache that if the requested filename
# exists, simply serve it.
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
# The following rewrites all other queries to index.php. The
# condition ensures that if you are using Apache aliases to do
# mass virtual hosting, the base path will be prepended to
# allow proper resolution of the index.php file; it will work
# in non-aliased environments as well, providing a safe, one-size
# fits all solution.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::'2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]
我现在如何从这些规则中排除博客目录
解决方法很简单。
公共文件夹可以在框架内访问。因此,我真正需要做的就是把我的wordpress blog文件夹放到它里面然后我们就可以开始
了即www.sampleSite/blog