2013-09-21 126 views
0

我在我的主機根文件夾中安裝了WordPress,並在子文件夾中安裝了vBulletin。 我將我的WordPress默認永久鏈接更改爲「postname」。在根文件夾中的WordPress和子文件夾中的vBulletin

現在,當我想打開論壇(vBulletin子文件夾)時,它重定向到根文件夾(WordPress)並給出「找不到帖子」。

當我刪除根文件夾(WordPress)中的.htaccess文件時,子文件夾工作正常,但訪問WordPress帖子會產生404錯誤。

我該如何解決這個問題?

這是我的WordPress .htaccess文件:

# 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> 

# END WordPress 

這是子文件夾(vBulletin).htaccess文件:

# Comment the following line (add '#' at the beginning) 
# to disable mod_rewrite functions. 
# Please note: you still need to disable the hack in 
# the vBSEO control panel to stop url rewrites. 
RewriteEngine on 

# Some servers require the Rewritebase directive to be 
# enabled (remove '#' at the beginning to activate) 
# Please note: when enabled, you must include the path 
# to your root vB folder (i.e. RewriteBase /forums/) 
#RewriteBase/

RewriteCond %{HTTP_HOST} !^soft-game\.ir 
RewriteRule (.*) http://soft-game.ir/forums/$1 [L,R=301] 

RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L] 

RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap|api\.php) 
RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA] 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/ 
RewriteRule ^(.+)$ vbseo.php [L,QSA] 

回答

1

您應該安裝在單獨的文件夾WordPress和vBulletin,因爲一分wordpress insallation中的文件夾意味着它是wordpress的一部分,它不會作爲一個獨特的實體。

創建兩個文件夾,首先命名爲'blogs'或wordpress,並在根目錄下創建另一個文件夾並將其命名爲'forums'或任何您喜歡的vBulletin,然後wordpress中的404錯誤消失。

+0

thank.but我用另一種方法來解決這個問題。 –

+0

我編輯了主目錄和子目錄的.htaccess文件。 –

+0

嗨醫生亨利,我在看類似的事情,你能解釋你做了什麼嗎? – Philip

相關問題