2013-01-15 73 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