dongxuxian6930 2012-08-11 03:58
浏览 15

如何使同一网站成为多个子域名

I need a big big help from you guys. I have a website, say for an example www.abc.com. My Client need to change this entire website for three subdomains to address three countries.all three should be identical copies.

Example:

  1. http://us.abc.com
  2. http://in.abc.com

All the three subdomains should work like the main website. I thought to copy all my site folders to copy into three folders as US, IN, FR and uploading it into the host and direct those folders to subdomains. Since this will create large number of files and folders I'll hesitate to do this.

Is this method is good or how should I overcome the situation... Glad if you can give me a clue. Thanks.

  • 写回答

1条回答 默认 最新

  • dougu4704 2012-08-11 04:16
    关注

    I'm not entirely sure what your question is:

    1. It sounds like you want to use Apache virtual hosts (so the different domain names will be handled by the same server):

    2. Of course, you need to have DNS for the three domains point to your web server

    3. You can use Apache configuration to allow the content to be shared or distinguished between the different domains as you wish.

    'Hope that helps...

    PS: To answer your original question:

    If "http://us.abc.com" and "http://in.abc.com" were different domains with identical content, you wouldn't even need virtual hosts: you could have "abc.com" serve both. But virtual hosts would still be cleaner - in case you wanted to customize one site or the other in the future.

    If, on the other hand, you had "http://mysite.abc.com" and "http://mysite.abc.com.in", then you could still serve both sites from the same server. But you must use virtual hosts (because "abc.com" and "abc.com.in" are different domains).

    Again - I hope that helps.

    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题