Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess 可以将域dns设置为特定子域_.htaccess_Dns - Fatal编程技术网

.htaccess 可以将域dns设置为特定子域

.htaccess 可以将域dns设置为特定子域,.htaccess,dns,.htaccess,Dns,我对dns域的设置有疑问。我想知道是否可以将一个域的dns设置为特定的子域。为了更好地解释,我举了一个例子:在domain sub.domain.com上,有一些我想在domain maindomain.com上显示的内容 有可能做到这一点吗 感谢您的回复。您正在寻找apache的基于名称的虚拟主机,请查看以下文档:httpd.apache.org/docs/2.2/vhostsIf如果我理解正确,我必须在maindomain.com上的.htaccess中写入将此域重定向到子域的内容?最好在主

我对dns域的设置有疑问。我想知道是否可以将一个域的dns设置为特定的子域。为了更好地解释,我举了一个例子:在domain sub.domain.com上,有一些我想在domain maindomain.com上显示的内容

有可能做到这一点吗


感谢您的回复。

您正在寻找apache的基于名称的虚拟主机,请查看以下文档:httpd.apache.org/docs/2.2/vhostsIf如果我理解正确,我必须在maindomain.com上的.htaccess中写入将此域重定向到子域的内容?最好在主服务器配置文件中进行设置。请提供一些有关环境的详细信息是的。可能“可能”部分取决于“有一些我想展示的内容”中“一些”的含义。但是dns是错误的,除了为两个名称设置记录以解析为相同的ip地址。谢谢你的反应,但我认为如果我告诉你我的目标是什么,会更好。若你们知道tumblr,那个么他们首先为你们的博客创建子域,在管理中,你们只需为自己的域设置dns,然后子域中的内容被重定向到域中。所以我想创造这样的东西。