2015-09-28 173 views
0

我正在爲我的網站使用框架(zend 2);它使用ht.access將所有URL請求重定向到索引頁面。這可以正常工作。如何在訪問文件上添加子訪問路徑

但是,我知道要添加一個WordPress的博客網站。

我不想讓博客服從於Zend模塊,因此需要在網站內部獨立。這意味着它不能受制於ht訪問規則。

Accordignly,Iwant所有網址有博客的目錄

即www.sampleSite /博客

不受到任何HT訪問規則。

以下是我的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] 

我現在該如何從這些規則

回答

0

的解決方法是相當簡單的排除博客目錄。

公共文件夾可在框架內訪問。 Accordinly,我真正需要做的是放置在它我的WordPress的博客文件夾,我們是好去

www.sampleSite/blog