更改 wordpress 站点的域名后,仅默认永久链接工作 wordpress 其他人返回 404 错误 [英] After changing domain name of wordpress site only default permalinks working wordpress others returns 404 error

查看:39
本文介绍了更改 wordpress 站点的域名后,仅默认永久链接工作 wordpress 其他人返回 404 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将非常感谢您的任何帮助,因为在阅读并尝试了大量教程后,我还没有找到任何解决方案.在我将域名从 www.examlpe.fr 更改为 www.newExample.fr 后,我只有主页成功运行,但其他链接返回 404 not found 错误.我尝试使用永久链接来管理这个,我发现只有默认的永久链接有效.

I will be really thankfull for any help, because After reading and trying a lot of tutorials, i have not found any solution. After i change domain name from www.examlpe.fr to www.newExample.fr, i have only the home page works successfully but others links returns 404 not found error. I try to manage this with Permalinks, i found only the default permalink works.

在 wp_config 我设置:

in wp_config i set:

define( 'WP_HOME', 'http://newExample.fr' );
define( 'WP_SITEURL', 'http://newExample.fr' );

也在functions.php中我设置:

Also in functions.php i set:

update_option( 'siteurl', 'http://newExample.fr' );
update_option( 'home', 'http://newExample.fr' );

我的 .htaccess 文件:

my .htaccess file:

# 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

此外,我尝试更新 .htaccess(制作一个旧的并创建一个空白的)文件并在编辑主链接时编辑权限

In addition, i try to update .htaccess(to make an old one and to create a blank one) file and edit permissions while editing primalinks

我也在 mysite.conf 中进行了更改以替换 AllowOverride None --> AllowOverride All

Also i have change in mysite.conf to replace AllowOverride None --> AllowOverride All

预先感谢您的帮助

推荐答案

我敢肯定,从我的服务器中心激活重写规则从一开始就解决了.

it's resolved i'm sure from the beginnig that was the activation of rewrite rules from my server center.

这篇关于更改 wordpress 站点的域名后,仅默认永久链接工作 wordpress 其他人返回 404 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆