使用 webmatrix 配置 WordPress 站点的主机名
如何配置在 Windows 上使用 webmatrix 构建的 WordPress 站点以在特定主机名而不是带有端口号的 localhost 上运行。
例如,我的网站当前正在 http://localhost:64044/ 上运行 我需要能够通过 http://www.mydomain.co.uk 查看它
我知道我可以在 Windows 中编辑我的主机文件,将我的域指向我的本地电脑,如下所示: 127.0.0.1 www.mydomain.co.uk
但我看不到如何或在哪里为 webmatrix 中的 wordpress 站点配置主机名绑定?
How can I configure a wordpress site built using webmatrix on windows to run on a specific hostname instead of localhost with a port number.
For example my site is currently running on http://localhost:64044/
I need to be able to view it via http://www.mydomain.co.uk
I know I can edit my hosts file in windows to point my domain to my local pc like so:
127.0.0.1 www.mydomain.co.uk
but I cant see how or where to configure hostname bindings for the wordpress site in webmatrix?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能无法直接从 WebMatrix 执行此操作。但您可以通过编辑 IIS Express 配置文件 %userprofile%\documents\iisexpress\config\applicationhost.config 手动完成此操作(WebMatrix 使用 IIS Express Web 服务器)。查看以下帖子
将 IIS Express 绑定到 IP 地址< /一>
<一href="https://stackoverflow.com/questions/5338184/is-it-possible-to-use-custom-host-headers-bindings-with-iis7-express/5341121#5341121">是否可以使用自定义主机标头/与 IIS7 Express 的绑定?
probably you can't do it directly from WebMatrix. But you can do it manually by editing IIS Express configuration file %userprofile%\documents\iisexpress\config\applicationhost.config (WebMatrix uses IIS Express web server). Take a look at following posts
Binding IIS Express to an IP Address
Is it possible to use custom host headers / bindings with IIS7 Express?