Solved

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

Posted on 2014-04-10
3
210 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
3 Comments
 
LVL 26

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 77

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

805 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