将域映射到WordPress页面 [英] Map Domain to WordPress Page

查看:108
本文介绍了将域映射到WordPress页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将域名映射到WordPress 页面?

Is there a way to map a domain name to a WordPress page?

例如,如果我有mydomain.com/about/bio和mydomain.com/about/resume,可以将anotherdomain.com映射到关于"页面,以便可以使用anotherdomain.com/bio和anotherdomain.com/resume ?

For example, if I have mydomain.com/about/bio and mydomain.com/about/resume, could I map anotherdomain.com to the about page so I could use anotherdomain.com/bio and anotherdomain.com/resume?

另外,我也可以使用子域吗?

Additionally, could I do it with a subdomain too?

使用上面的相同示例,我可以将about.anotherdomain.com映射到mydomain.com/about吗?

Using the same example above, could I map about.anotherdomain.com to mydomain.com/about?

使用WordPress,这些不是物理文件夹.它们是永久的链接,所以我很难弄清楚如何使它工作.

With WordPress, these aren't physical folders. They're pretty permalinks, so I'm having trouble figuring out how to make this work.

我们有一个Plesk控制面板.

We have a Plesk control panel.

感谢您提供的任何见解!

Thanks for any insight you can provide!

我想映射到URL的不同部分的域可能是从各种提供商处注册的.

The domains that I'd like to map to different parts of the URL may be registered from various providers.

推荐答案

您可以使用.htaccess文件来实现....

You can achive this using the .htaccess file....

只需将您的域名A记录指向您的域.现在执行以下操作...

Just point the A record of your domain names to your domain. Now do the following...

RewriteCond %{HTTP_HOST} ^(www.)?mydomain.com
Rewriterule ^(.*)$ http://mydomain.com/about/bio [L]

RewriteCond %{HTTP_HOST} ^(www.)?myresumedomain.com
Rewriterule ^(.*)$ http://myresumedomain.com/about/resume [L]

RewriteCond %{HTTP_HOST} ^(www.)?anotherdomain.com
Rewriterule ^(.*)$ http://anotherdomain.com/bio [L]

这篇关于将域映射到WordPress页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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