2013-01-15 77 views
0

這是我的第一個問題。 我在根目錄上有一個wp站點,它有自己的.htaccess文件。.htaccess衝突

RewriteEngine off 
<IfModule mod_suphp.c> 
suPHP_ConfigPath /home/katambi/public_html/php.ini 
<Files php.ini> 
order allow,deny 
deny from all 
</Files> 
</IfModule> 

# 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 

在另一個目錄我SocialEngine網站。它也有.htaccess文件。

<IfModule mod_rewrite.c> 
    Options +FollowSymLinks 
    RewriteEngine On 

    # Get rid of index.php 
    RewriteCond %{REQUEST_URI} /index\.php 
    RewriteRule (.*) index.php?rewrite=2 [L,QSA] 

    # Rewrite all directory-looking urls 
    RewriteCond %{REQUEST_URI} /$ 
    RewriteRule (.*) index.php?rewrite=1 [L,QSA] 

    # Try to route missing files 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} public\/ [OR] 
    RewriteCond %{REQUEST_FILENAME} \.(jpg|gif|png|ico|flv|htm|html|php|css|js)$ 
    RewriteRule . - [L] 

    # If the file doesn't exist, rewrite to index 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteRule ^(.*)$ index.php?rewrite=1 [L,QSA] 

</IfModule> 

問題:當我進入包和插件頁面時,它顯示404錯誤。 =(

當我

# BEGIN WordPress 

之間刪除代碼
# END WordPress 

WP站點下來,但社交網絡的運行是正確的。

謝謝您的回答。

+0

¿目錄結構如何,WP在哪裏,「社交」應用程序在哪裏,.htccess文件在哪裏......?請提供完整的信息。 –

+0

root/.htaccess/* wp的htaccess */ root/socialengine文件夾/ .htacess/*社會的htaccess */ – BelArt

回答

1

# BEGIN WordPress# END WordPress之間的代碼會重定向所有請求到根目錄的index.php。您需要確保SocialEngine目錄的請求沒有被重定向。所以你可以試試這個解決方案 - .htaccess & Wordpress: Exclude folder from RewriteRule

+0

如何檢查SocialEngine安裝重定向? 我認爲WP .htaccess文件在Social的.htaccess中寫入它的規則。 重要的是,我只有在「安裝」文件夾中有404錯誤。 Social的其他部分運行正常。 – BelArt

+0

您可以在SocialEngine的.htaccess文件中爲SocialEngine安裝文件夾編寫規則。 – Salman

+0

以百萬美元爲單位的問題:我該寫什麼? :) – BelArt