新 wordpress 站点中奇怪的 url 重写问题 [英] Strange url rewrite issue in new wordpress site

查看:26
本文介绍了新 wordpress 站点中奇怪的 url 重写问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在具有以下 DNS 主机名的 AWS EC2 主机中设置了一个新的 Wordpress 站点:

I have just setup a new Wordpress site in an AWS EC2 host with the following DNS host name:

http://ec2-34-230-30-128.compute-1.amazonaws.com/

一切正常,所以我继续设置一个友好的域名:

Everything was working fine so I just went ahead and setup a friendly domain name:

wordpress.devtechperu.com

使用 CNAME 指向 DNS 主机名(我使用 AWS Route 53).

that points to the DNS host name using a CNAME (I use AWS Route 53).

但是,现在当我导航到 wordpress.devtechperu.com 时,Wordpress 会以 http://ec2-34-230-30-128.compute-1.amazonaws.com/ 显示该网站在浏览器网址中!!

However, now when I navigate to wordpress.devtechperu.com, Wordpress shows the site with http://ec2-34-230-30-128.compute-1.amazonaws.com/ in the browser URL!!

我从未在其他网络服务器上遇到过这个问题,所以我猜 WordPress 正在以某种方式重写 url?

I have never run into this issue with other webservers so I guess WordPress is rewriting the url somehow?

感谢任何帮助.

推荐答案

WordPress,默认情况下(如果在 Apache 中启用了像 mod_rewrite 这样的重写处理程序),重定向到您设置为的 URL网站地址.

WordPress, by default (if a rewrite handler like mod_rewrite in Apache is enabled), redirects to the URL that you have set as Site Address.

更改 DNS 记录后,您还应该通过转到设置 → 常规更新控制面板中的 站点地址WordPress 地址 值.其他方法是更改​​数据库中的这些值,它们在 wp_options 表中为 siteurlhome.

After changing the DNS records, you should also update the Site Address and the WordPress Address values in the dashboard by going to Settings → General. Other method is changing those values in the database, they are in the wp_options table as siteurl and home.

有关更改 WordPress 站点 URL 的更多信息,请查看更改站点 URL.

For further information about changing WordPress Site URL check out Changing The Site URL.

这篇关于新 wordpress 站点中奇怪的 url 重写问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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