微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

从 Live 服务器迁移到 Localhost XAMPP 后链接中的问题

如何解决从 Live 服务器迁移到 Localhost XAMPP 后链接中的问题

在我的职业生涯中,我已经将 50 多个网站从 Live 服务器迁移到了 Localhost,但直到现在还没有遇到过这个问题。我使用 ALL IN ONE WP MIGRATION 从实时服务器导出数据。我在导出过程中替换了 url。

http://www.example.com/ to http://localhost/example/

我在本地主机的全新 wordpress 安装中导入了数据。一切都很顺利。我的主页加载也很好。但是,当我单击主页徽标时,该徽标应该重定向到 http://localhost/example/ 但重定向到 XAMPP 的 http://localhost/dashboard。当我单击菜单项 -> 应该重定向到 http://localhost/example/services 但重定向到 http://localhost/services 的服务。

我尝试将站点地址 URL 和 wordpress 地址 URL 更改为 http://localhost/example/。

我的 .htaccess 文件

# BEGIN wordpress
# The directives (lines) between "BEGIN wordpress" and "END wordpress" are
# dynamically generated,and should only be modified via wordpress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /example/
RewriteRule ^index\.PHP$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /example/index.PHP [L]
</IfModule>

# END wordpress

感谢任何帮助。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。