2017-06-19 110 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