HTTP_HOST中的IP地址 [英] IP address in HTTP_HOST

查看:241
本文介绍了HTTP_HOST中的IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个drupal网站,我使用使用入站HTTP_HOST变量的域访问模块。我必须创建一些子域。为了使此模块正常工作,$ _SERVER ['HTTP_HOST']变量应该具有域名在它。但是我得到了我们的服务器的IP地址。所以我的网站不能正常工作。我正在获得主要的站点。但子域名不工作。所有都指向主站点。



我的网站在我们的服务器上,我们要求我们的主机将我们的域名指向172.XX.XXX/drupal。我们的子域也指向172.XX.XXX/drupal。
所以当我键入域名它显示的网站,但http_host有它的IP。我们有一个VPS主机计划。我该怎么做,使其正常工作。
请帮助。

解决方案

看起来很简单。
您只需要告知您的域主机提供商将所有子域指向172.xxx。 ip / drupal。

 一些例子。 

a.yourdomain.com => actuall会指向172.xxx/drupal。

b.yourdomain.com => actuall会指向172.xxx/drupal。

c.yourdomain.com => actuall会指向172.xxx/drupal。之后,您的域名访问模块会自动处理您的子域明智的内容访问。
注意:技术上的域名访问模块将根据您当前的子域名显示内容。


I have a drupal site where I use the domain access module that works using inbound HTTP_HOST variable.I have to create some subdomain's also.To make this module work properly the $_SERVER['HTTP_HOST'] variable should have the domain name in it .But I am getting the ip address of our server.So my site is not working properly.I am getting the main site.But the subdomains are not working.All are pointing to the main site.

My site is on our server and we asked our host to point our domain name to 172.XX.XXX/drupal.Our subdomains are also pointed to 172.XX.XXX/drupal. So when I type the domain name it is showing the site but the http_host has IP in it.We have a VPS host plan.What should I do to make it work properly. Please help.

解决方案

Thing looks very easy. You are just required to tell your domain host provider to point all your sub - domains to 172.xxx. ip / drupal.

some examples.

a.yourdomain.com => actuall would point to 172.xxx/drupal.

b.yourdomain.com => actuall would point to 172.xxx/drupal.

c.yourdomain.com => actuall would point to 172.xxx/drupal.

After that your domain access module would automatically take care of your sub-domain wise access to content. Note: Technically domain access module would show the content based on your current sub domain name.

这篇关于HTTP_HOST中的IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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