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
Solved

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

Posted on 2014-04-10
3
212 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 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 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

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.

837 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