在 PHP 中为多个域使用一个站点 [英] Using one site for multiple domain in PHP

查看:34
本文介绍了在 PHP 中为多个域使用一个站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个完全为一个客户工作的站点,现在我有更多的客户想要为他们复制相同的内容,有什么办法可以将此站点用作基本站点,因为我计划从那里访问该站点域并为每个客户端提供数据库.

I have one site completely working for one client , now I have some more clients want same thing replicated for them , Is there any way , that I can use this site as base site , as I plan to access this site from there domain and providing database for each client.

我正在使用 PHP 和 MYSQL.感谢您的任何支持,我也感谢您在此过程中的观点.我有正确的方法吗

I am using PHP and MYSQL. Thanks for any support , I appreciate your point of view also in this process. do I have right approach

有人告诉我,如果我将一个站点用于多个域,则会出现 SEO 问题.我没有可以指导我进行域名链接的称职人员.我有 www.xyzuniversity.com 并且 85% 的数据是从数据库中获取的.现在我必须创建 abcuniversity.com,我希望我只创建新数据库并准备使用,如果我成功,我想我可以创建多个这样的网站

I have been told that there will be SEO issues if I use one site for multiple domain. I have no competent person available which can direct me on domain name linking. I have www.xyzuniversity.com and 85% data is fetching from database. now i have to create abcuniversity.com and I want that I just create new database and ready to use and I think I can make multiple sites like this , if I succeed

谢谢

推荐答案

您可以将多个域指向站点.您可以从服务器变量 ($_SERVER['HTTP_HOST']) 获取域名并通过它选择您的数据库.确保您没有任何绝对链接.

You can point multiple domains to the site. You can get the domain name from the server vars ($_SERVER['HTTP_HOST']) and choose you database through that. Make sure you dont have any absolute links.

这篇关于在 PHP 中为多个域使用一个站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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