htaccess how to make www.subdomain paraller to subdomain?

Discussion in 'Server Operation' started by alva, Aug 17, 2007.

  1. alva

    alva New Member

    Please tell me what code is necessary to write in htaccess file to make same as

    problem is that my blog system understand only but if user writes www by mistake system shows url error. So I'm sure there must be a code that will make same as for all registered domains.
  2. falko

    falko Super Moderator ISPConfig Developer

    You must add
    to the vhost configuration in Apache (not .htaccess). And of course, must point to the correct IP address in DNS.
  3. alva

    alva New Member

    I want this to be used for all automatically created subdomains not just for one or two. my domain is how to do this?! and at the same time I do not want mistake like to be the same as This is the only let's say subdomain that I do not want to be forwarded anywere to allow people go to the main page without problem and register for new blogs.
  4. falko

    falko Super Moderator ISPConfig Developer

    You can add as many subdomains to the ServerAlias line as you like, e.g.
    You'd have to filter that out yourself, e.g. with a script.
  5. goitalone

    goitalone New Member

    Need help understanding and configuring home web server virtualhost & subdomains

    I have yet to figure out or understand exactly how to make a top level subdomain work to display something other than my regular website.

    For example:

    I want to display an entirely new site from a different folder, but right now this is the path to ALL of my regular site (forum) content:


    I am using my own domain I signed up and paid for up for at and forwarded my info to to get my domain to work on my webserver from home (at least I think I had to do it that way...still not sure)

    At Netfirms, I can change the A records, CNAME's etc. there but I am not sure if I need to configure anything at Netfirms as well as at, or just at if I can do it all from Netfirms)

    I don't know exactly what I am doing wrong, but I can't seem to get it to work right.

    I made a domain test subdomain name with A record at freedns (CNAME wouln't work)

    I added this to Apache:

    <VirtualHost *:80>
    # ServerAdmin [email protected]
    DocumentRoot /gay
    # ErrorLog logs/
    # CustomLog logs/ common

    I made a folder for a new site.

    Tried playing around with .htaccess configurations since that is new to me too and that didn't help.

    Scoured the net looking for an answer, couldn't quite find one that worked for me....nothing worked.

    Can someone please help me figure this out?

    Thanks alot!
  6. falko

    falko Super Moderator ISPConfig Developer

    That site is working for me (or should I see different content?).
  7. goitalone

    goitalone New Member

    I finally managed to figure it out, thanks!

    I still have to figure out how to use .htaccess commands etc. for, if nothing more, to gain some extra knowledge.

    Can I make subdomain.domain disguised as something else other than ending with my actual domains name?

    Any advice or commands that you could mention of the top of your head that could be useful for .htsccess? I dunno, like maybe explin rewrite a bit to me?
  8. falko

    falko Super Moderator ISPConfig Developer

    I think the best is to take a look here:
  9. goitalone

    goitalone New Member

    Alright cool thanks!

Share This Page