【问题标题】:Website links auto insert string网站链接自动插入字符串
【发布时间】:2015-01-01 04:12:12
【问题描述】:

我为某人创建了一个新网站,但是当我尝试实时启动它时,我遇到了链接问题。 并且常规链接也会获得特定的“字符串”。

例子:

<link rel="stylesheet" href="http://sites.com/style.css"> -> <link rel="stylesheet" href="http://sites.com/web/index.html/style.css">
<a href="http://sites.com/contact"> -> <a href="http://sites.com/web/index.html/contact">

在 wordpress 编辑器中每次更改后,链接都会再调整一个 /web/index.html/
wordpress 数据库中的链接很好。

【问题讨论】:

  • 您原来的href 缺少协议。另外,there's not enough information here to reproduce the problem.
  • 我编辑了我的帖子。我不知道为什么每次对我的域名的引用都会得到这个字符串。
  • 干净安装默认主题的 WordPress 会发生这种情况吗?
  • 我刚刚测试过,是的,问题仍然存在。
  • 必须与您的托管服务提供商有关?

标签: wordpress .htaccess shared-hosting


【解决方案1】:

您必须在 Wordpress 管理员中设置 Siteurl 和 Homeurl。

siteurl 是 wordpress 文件在服务器上的位置。

sites.com/web

主页是sites.com

您也可以在 Wordpress config file

【讨论】:

  • 我在 wp-config 中定义了 home 和 siteurl 并在 function.php 中更新了它,但同样的问题。 (codex.wordpress.org/Changing_The_Site_URL) 在 wp-admin 的设置/常规中,WordPress 地址 (URL) 和站点地址 (URL) 会附加该字符串,即使在数据库中链接的方式是正确的。
  • 站点地址 (URL) 不能在 wordpress 管理员中更改,甚至在数据库中也不能。我试了几次,地址都是一样的。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2021-03-13
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-07-28
相关资源
最近更新 更多