Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3665778
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:48:07+00:00 2026-05-19T01:48:07+00:00

How do i offer Basecamp/SAAS App like sub domains to clients? For example, my

  • 0

How do i offer Basecamp/SAAS App like sub domains to clients?

For example, my website URL is http://www.example.com whenever the user signup i want to offer them url like http://company.example.com which should load files/contents from /app directory of the website.

And later i want them to choose their own domain/sub-domain via CNAME, so that they can have URL like http://clients.mywebsite.com

I want to do this in Pure PHP and .HTACCESS and offcourse everything happens automatically.

And i want to keep URL structure same.., that is http://company.example.com/login, http://company.example.com/accounts, http://company.example.com/files/style.css though these files are located inside /app directory i want them to be accessed like this.

I can handle all PHP functions, i need help with .htaccess codes and how to go about CNAME.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T01:48:07+00:00Added an answer on May 19, 2026 at 1:48 am

    Make sure DNS resolves all subdomains by including following in domain’s zone:

    *.example.com. 14400 IN A HereBeIP
    

    Next, configure web server to recognize all incoming requests, for Apache, you need to add following to VirtualHost:

    ServerAlias *.example.com
    

    That’s it. The only thing remaining is the logic in the code, you need to check host name to see whether a request was done to example.com or foo.example.com.

    Updated with more details.

    So, assuming your files are in /path/to/files/app, you need to configure virtual host like this:

    <VirtualHost>
        SeverName example.com
        ServerAlias *.example.com
        DocumentRoot /path/to/files/app
        # plus what else is needed
    </VirtualHost>
    

    This way all requests will resolve to /app directory. To test it, apply above DNS configuration or simply add the domains you want tested into your hosts file, /etc/hosts on Linux or c:\Windows\System32\drivers\etc\hosts on Windows.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to offer a database connection prompt to the user. I can
I thought I'd offer this softball to whomever would like to hit it out
I want to offer credit card payment on my website and was wondering whats
Over at rsscache they offer a mechanism that caches your website's feed. They claim
can I offer on my website my program (beta version) for free to test
I want to offer phone support in my app at the press of a
How can i offer custom url's for files uploaded by users. For ex: user
Several extensions offer a bottom window for viewing their content. Firebug and ScribeFire are
What references offer a good summary/tutorial for using RDF/OWL? There seem to be enough
Do the international students get a job offer in Australia after completing their Masters degree from University of Melbourne?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.