[英]Wordpress:500 internal server error after changing url
My domain ( example.com
) is pointed to public_html/cushbu
it contains a wordpress project 我的网域(
example.com
)指向public_html/cushbu
,其中包含一个wordpress项目
so i've changed the settings in wp-config
file 所以我已经更改了
wp-config
文件中的设置
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
Also in .htaccess
file thats under pubic_html/cushbu
folder 同样在
pubic_html/cushbu
文件夹下的.htaccess
文件中
# 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]
I got 500 error when accessing my domain ( www.example.com
) 访问我的域(
www.example.com
)时出现500错误
Remove example.com
in .htaccess from the RewriteBase
and RewriteRule
. 从
RewriteBase
和RewriteRule
删除.htaccess中的example.com
。 It is probably easiest for you to rename the file to bck.htaccess
and let wordpress generate a new one for you. 将文件重命名为
bck.htaccess
并让wordpress为您生成一个新文件可能是最容易的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.