Solved

how to assign a custom domain to each customer without sharing code

Posted on 2014-04-10
3
214 Views
Last Modified: 2014-04-16
I am providing a service on following url

http://www.mydomain.com/live/agent/index.php?user_name=david ## home page
http://www.mydomain.com/live/agent/blog.php?user_name=david ## blog
http://www.mydomain.com/live/agent/view_blog.php?user_name=david&blog_id=10 ## blog details page

Now i want that if a username register a website as http://www.davidwebsite.com 

http://www.davidwebsite.com/blog should actually get request from http://www.mydomain.com/live/agent/blog.php?user_name=david and i don't have to share my source code  with every customer's domain and hosting.

Any solution ???
0
Comment
Question by:birwin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 27

Expert Comment

by:dpearson
ID: 39992873
I think you may want to look into apache's "rewrite" rules, which allows you to take a request in a specific format and rewrite it to your service.

You'd run the rewrite logic on the davidwebsite.com domain(s) and it would redirect the requests to your mydomain.com service - where you one copy of the source code to do the work would live.

Details on configuring apache rewrite rules are here:
http://httpd.apache.org/docs/current/rewrite/

Hope that helps,

Doug
0
 
LVL 78

Accepted Solution

by:
arnold earned 500 total points
ID: 39992877
You would configure virtual host entry on your server to respond to the request based on www.someotherdomain.com
The difficulty deals with your need is for /blog.
I.e. Your best bet is to use blog.someotherdomain.com to point to your server using a CNAME and your httpd.conf or conf.d/someotherdomain.conf will have the site definition.

You may have to use apache proxy configuration as well.
0
 
LVL 6

Author Closing Comment

by:birwin
ID: 40005122
This was not the solution to my situation. There are problems using forms.

I have been asked to close this question.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article you will learn how to create a free basic website on Bitbucket, a git service provider. Polymer creates dynamic HTML components, which allow more flexibility than static HTML. This tutorial uses Ubuntu Linux but can also be done on W…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question