Solved to How?

Posted on 2006-04-30
Last Modified: 2010-03-04
I'm looking for ideas or solutions to the following...

I have a multi-blog system where people access these blogs through a URL like:
Using mod_rewrite that URL redirects to
index.php and all the associated files are stored under /www/ and I would prefer to keep them there if possible.

The above works fine, but we are now forced to change our URL structure to instead (or would be fine too). blogname is dynamic and as a first step I setup wildcard dns so does work. It just pulls up by default.

So any ideas on how to accomplish that? I tried and using mod_rewrite was able to redirect those requests to but the problem with that was mod_rewrite sees them as different sites so won't transparently redirect them and changes the URL in the address bar I assume as a security thing. The URL cannot change.
Question by:nsanden
    LVL 27

    Accepted Solution

    And your wildcard subdomain points to which folder? /www/ Or how did you configure the virtual host?

    Do you've access to the httpd.conf or are you forced to use per-dir configuration files (".htaccess")?
    LVL 2

    Author Comment

    Thanks for the response.

    regarding I edited the hosts file for and added a line like:
    *       IN      A       IPADDRESS

    I have access to httpd.conf and anything else on the server.
    LVL 2

    Author Comment

    The virtual host does go to /www/

     ServerAlias *
     DocumentRoot /www/

    Perhaps it should go to /www/ and add another virtual host for before it?
    LVL 2

    Author Comment

    Okay now i'm feeling stupid. That was rediculously easy. Working great now after pointing * to /www/

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
    If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now