2017-06-19 106 views
0
后500内部服务器错误

我的域(example.com)指向public_html/cushbu它包含一个WordPress项目的WordPress:更改URL

所以我在wp-config文件中.htaccess更改的设置

define('WP_HOME','http://example.com'); 
    define('WP_SITEURL','http://example.com'); 

而且pubic_html/cushbu文件夹

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

# END WordPress 


# Wordfence WAF 

<Files ".user.ini"> 
<IfModule mod_authz_core.c> 
    Require all denied 
</IfModule> 
<IfModule !mod_authz_core.c> 
    Order deny,allow 
    Deny from all 
</IfModule> 
</Files> 

# END Wordfence WAF 

#disable hotlinking of images with forbidden or custom image option 
RewriteEngine on 
RewriteCond %{HTTP_REFERER} !^$ 
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?example.com [NC] 
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC] 
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L] 

下的文件多数民众赞成访问我的域名(0时,我得到500错误)

+0

变化RewriteBase /example.com到RewriteBase/cushbu –

+0

也改变重写规则/cushbu/index.php [L] –

+0

NOP仍在相同的错误 – Jabaa

回答

1

在.htaccess从RewriteBaseRewriteRule删除example.com。 您可能最容易将文件重命名为bck.htaccess,并让wordpress为您生成一个新文件。

+0

请使用'.htaccess文件更新' – Jabaa

+0

请参阅@ shital-marakana的评论,这与我的回答ecxatly相同。 – jojomojo