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 8124891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:37:09+00:00 2026-06-06T06:37:09+00:00

For development projects I point real domains to localhost using hosts file. and I

  • 0

For development projects I point real domains to localhost using hosts file. and I add virtual host definition to apache config file. My question is it possible to redirect all “xyz.com” domains to “d:/xampp/htdocs/websites/xyz.com” directory ? this way I will not need to add vhost definition everytime.

  • 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-06-06T06:37:11+00:00Added an answer on June 6, 2026 at 6:37 am

    You can use a wildcard in your VirtualHost‘s ServerAlias directive:

    <VirtualHost *:80>
      # Official name is example.com
      ServerName example.com
    
      # Any subdomain *.example.com also goes here
      ServerAlias *.example.com
    
      DocumentRoot "D:/xampp/htdocs/websites/xyz.com"
    
      # Then rewrite subdomains into different directories
      RewriteEngine On
      RewriteCond %{HTTP_HOST} ^(.*)\.example.com$
      # Use the %1 captured from the HTTP_HOST
      # For example abc.example.com writes to websites/abc.com
      RewriteRule ^(.*)$ "D:/xampp/htdocs/websites/%1.com/$1" [L]
    </VirtualHost>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small amount of experience using SVN on my development projects, and
I've been using Amazons t1.micro servers for all my private web development projects so
I'm part of a development team that works on many CMS based projects, using
In early phases of software development projects the conceptual data model is designed. In
I have not done any large game development projects, only messed around with little
Our small development shop is looking to migrate our projects from VSS to TFS,
I have some projects for which I have ceased development a long time ago
Our main solution is the development code: shared libraries, services, UI projects, etc. The
I used TDD as a development style on some projects in the past two
We have 15 projects in our development environment. Some are test projects, most are

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.