Title: 301 redirection
Last modified: 2020 年 9 月 28 日

---

# 301 redirection

 *  [dingwp](https://cn.wordpress.org/support/users/dingwp/)
 * (@dingwp)
 * [7年、 11月前](https://cn.wordpress.org/support/topic/301-redirection/)
 * 我用word press 4.9.1建立了一个测试页面，遇到如下问题：
    1、当setting里的wordpress
   地址和站点地址配置如下时： [http://139.159.226.85/wordpress](http://139.159.226.85/wordpress)
   使用如下命令： curl -1 -H ‘Host: 192.168.0.110’ [http://192.168.0.110/wordpress/](http://192.168.0.110/wordpress/)(
   192.168.0.110是139.159.226.85的内网地址） 可以正常获取响应； 使用 curl -1 -H ‘
   Host: 192.168.0.110:80’ [http://192.168.0.110/wordpress/](http://192.168.0.110/wordpress/)
   则会返回301，并指向：http://192.168.0.110/wordpress 2、当setting里的wordpress
   地址和站点地址配置如下时： [http://139.159.226.85:80/wordpress](http://139.159.226.85:80/wordpress)
   使用如下命令： curl -1 -H ‘Host: 192.168.0.110:80’ [http://192.168.0.110/wordpress/](http://192.168.0.110/wordpress/)
   可以正常获取响应； 使用 curl -1 -H ‘Host: 192.168.0.110’ [http://192.168.0.110/wordpress/](http://192.168.0.110/wordpress/)
   则会返回301，并指向：http://192.168.0.110:80/wordpress
 * 因为不同的客户端在提交http请求时可能在header里host携带端口号，也可能不携带，所以
   需要wordpress同时支持两种host，请问这个怎么实现？

 话题 ‘301 redirection’不再接受新回复。

## 标签

 * [301](https://cn.wordpress.org/support/topic-tag/301/)

 * 发表在: [安装、升级和使用](https://cn.wordpress.org/support/forum/issues/)
 * 0个回复
 * 1人参与
 * 最后动态：[7年、 11月前](https://cn.wordpress.org/support/topic/301-redirection/)
 * 状态： 尚未解决

## 话题

### 最热话题

### 没有回复的话题

### 非支持话题

### 已解决的话题

### 未解决的话题

### 所有话题
