2013-10-22 14 views
1

我有我的服務器由HostGator的,像這樣如何使工作的.htaccess中安裝在根

在根託管於多個域中安裝我的主網站,我通過 web_sites其中名稱有子文件夾與WordPress子我的其他域名安裝現在問題是當我試圖訪問我的子文件夾,如http://www.xyz.com/subfolder/它的作品,但當我嘗試訪問這樣的http://www.xyz.com/subfolder/category/furniture 現在子文件夾也有.htaccess文件,所以它顯示我沒有找到頁http://www.xyz.com

這是因爲根.htaccess沒有使內部的.htaces S檔的工作有什麼解決辦法,這是我的.htaccess文件

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

        # END WordPress 

這裏面的子文件夾.htacess

Options +FollowSymLinks 
RewriteEngine On 
RewriteRule ^home/$ index.php [L,QSA] 
RewriteRule ^search_result/$ search_result.php [L,QSA] 

RewriteRule ^pages/([-A-z0-9]+)/? pages.php?url=$1 [L,QSA] 

RewriteRule ^user/([-A-z0-9]+)/? author.php?username=$1 [L,QSA] 

RewriteRule ^cms/([-A-z0-9]+)/? cms.php?url=$1 [QSA,L] 

RewriteRule ^location_posts/([-A-z0-9]+)/? city.php?city=$1 [L,QSA] 

RewriteRule ^topcat/([-A-z0-9]+)/([-A-z0-9]+)/? categories.php?id=$1&name=$2 [L,QSA] 

RewriteRule ^maincat/([-A-z0-9]+)/([-A-z0-9]+)/? main_categories.php?id=$1&name=$2 [L,QSA] 

RewriteRule ^posts/([-A-z0-9]+)/([-A-z0-9]+)/? post_description.php?id=$1&name=$2 [L,QSA] 

RewriteRule ^special/([-A-z0-9]+)/? special_detial.php?url=$1 [L,QSA] 

RewriteRule ^specials_products/$ specials_products.php [L,QSA] 

RewriteRule ^pricing/$ printing_pricing.php [L,QSA] 

RewriteRule ^custom_design/$ custom_design.php [L,QSA] 

RewriteRule ^registration/$ registeration.php [L,QSA] 

RewriteRule ^portfolio/$ portfolio.php [L,QSA] 

RewriteRule ^custom_quote/$ custom_quote.php [L,QSA] 

RewriteRule ^templates/$ templates.php [L,QSA] 

RewriteRule ^all_templates/$ download_templates.php [L,QSA] 

RewriteRule ^recent_posts/$ recent_posts.php [L,QSA] 

RewriteRule ^current_auctions/$ current_auctions.php [L,QSA] 

RewriteRule ^anil_lal/$ info.php [L,QSA] 

P.S我試圖找到通過搜索沒有工作我的解決方案。

+0

您可以發佈'子的.htaccess'代碼。 – anubhava

+0

在子文件夾中是否還安裝了CMS? – anubhava

+0

該文件夾中有人的子域/網站,所以我必須做一些與根htacess –

回答

0

我終於找到一個解決方案,它的工作,但它並不理想,所以我張貼它,所以它可以幫助脂肪酶

我所做的是從管理WordPress的面板去

設置 - >固定鏈接

更改permal油墨爲默認

所以它會顯示你的WordPress網站作爲http://xyz.com/?p=123

,但你的子文件夾用漂亮的網址的網站將努力

保持調整,直到我找到了一些其他的解決辦法

0

爲你的子目錄明確的免除你的根.htaccess,例如。

RewriteCond %{REQUEST_FILENAME} !^subfolder 
0

這應該是:

RewriteCond %{REQUEST_FILENAME} !-d 
+0

不工作我已經在我的htaccess根目錄中有這個 –