多个域到一个动态站点
我正在为一家拥有多个用户/销售人员的公司建立一个网站,每个用户都需要自己的网站。我想要完成的是建立一个可以动态提取每个用户信息的网站。因此,我将建立一个网站并动态提取每个用户的信息。例如:
www.company.com/Mike
www.company.com/Steve
www.company.com/Jason
每个 url 都会使用会话、cookie 和 url 变量提取该特定用户的信息和内容。这将使每个 url 看起来像是不同的站点,尽管它是具有动态数据的同一站点。我知道如何实现这一点,但我真正想要实现的是为每个用户提供自己的域。
我的问题是:如何允许每个用户设置一个唯一的域,然后将该域指向动态提取动态数据的 url:
Mike.com --> www.company.com/Mike
Steve.com --> www.company.com/Steve
Jason.com --> www.company.com/Jason
我想完成此任务并确保他们的网站像独立网站一样对 SEO 友好地点。我知道我可以转发网址,但我想要一些更像实际网站并且 SEO 友好的东西。
我正在用 php、mysql 和 javascript 构建它。我正在设置的 LAMP 服务器上运行该网站。感谢您的帮助。
I am building a website for a company who has multiple users/sale people and each user needs their own website. What I want to accomplish is building one site that pulls in each users information dynamically. So i will build one site and pull in each users info dynamically. For example:
www.company.com/Mike
www.company.com/Steve
www.company.com/Jason
Each url would then pull in that particular user's information and content using sessions, cookies and url variables. This would then make each url look like a different site although it is the same site with dynamic data. I know how to accomplish this but what i would really like to accomplish is giving each user their own domain.
My question is: How do I allow each user to set up a unique domain and then point that domain to the url that dynamically pulls in the dynamic data:
Mike.com --> www.company.com/Mike
Steve.com --> www.company.com/Steve
Jason.com --> www.company.com/Jason
I want to accomplish this and make sure that their site is SEO friendly like a stand alone site. I know that i could just forward the url but i would like something that acts more like an actual site and is SEO friendly.
I am building this in php, mysql and javascript. I am running the site on LAMP server set up. Thank you for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用的是apache,则可以使用mod_rewrite来进行重写。尝试将其添加到您的 .htaccess 文件中:
这将使其请求 http://Mike.com/page.html< /a> 将提供 http://www.company.com/Mike/page.html
If you are using apache, you can use mod_rewrite to do the rewriting. Try adding this to your .htaccess file:
This will make it so requesting http://Mike.com/page.html will serve http://www.company.com/Mike/page.html