Link to home
Start Free TrialLog in
Avatar of birwin
birwinFlag for Canada

asked on

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

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 ???
Avatar of dpearson
dpearson

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
ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of birwin

ASKER

This was not the solution to my situation. There are problems using forms.

I have been asked to close this question.