Virtual Domain Hosting????

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GFED
    Confirmed User
    • May 2002
    • 8121

    #1

    Virtual Domain Hosting????

    Anybody know how to do this?

    I've got a domain at domaina.com with an IP address xxx.xxx.xxx.xxx

    I want domainb.com to point to domaina.com/domainb

    I made an index.cgi but it doesn't display domainb.com in the location it displays domaina.com/domainb

    How would I make it say domainb.com in the location?

    I read some text at http://httpd.apache.org/docs/vhosts/examples.html

    about apache, but I am just confused.



    Thanks,

    Will
    https://www.flow.page/savethechildren
  • hyper
    Confirmed User
    • Mar 2002
    • 5294

    #2
    #
    # In this file, you need only change the value "yourdomain" to match
    # your real domain ("whatever\.com", and all "." must be prefixed with a "\")
    #
    # Then you create the "subdomains" directory in your public_html directory
    # and create in that directories named for the subdomain you want:
    # http://iwantthis.yourdomain/ would be in /public_html/subdomains/iwantthis/
    #
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www\.)?yourdomain$ [NC,OR]
    RewriteCond %{REQUEST_URI} ^/?subdomains/ [NC]
    RewriteRule ^. - [L]
    RewriteCond %{HTTP_HOST} ^(www\.)?[^.]+\.yourdomain$ [NC]
    RewriteCond %{REQUEST_URI} !^(www\.)?[^.]+\.yourdomain$ [NC]
    RewriteRule ^(.+) %{HTTP_HOST}/$1 [NC]
    RewriteRule ^(www\.)?([^.]+)\.yourdomain/(.*) /subdomains/$2/$3 [L]

    Comment

    • GFED
      Confirmed User
      • May 2002
      • 8121

      #3
      is this insrted in my .htaccess file?
      https://www.flow.page/savethechildren

      Comment

      • -=HUNGRYMAN=-
        Confirmed User
        • Jun 2001
        • 4753

        #4
        This is MUCH easier .... go to www.zoneedit.com and sign up ...
        they offer FREE domain forwarding for up to 5 domails ... as well as free unlimited email forwarding for the same domains ...

        and you can cloak the domain name as well .... I have used this service for directing many of the .NETs I own to the .COMs ...

        Comment

        • oscer
          Confirmed User
          • Jan 2001
          • 2834

          #5
          Originally posted by GFED
          Anybody know how to do this?

          I've got a domain at domaina.com with an IP address xxx.xxx.xxx.xxx

          I want domainb.com to point to domaina.com/domainb

          I made an index.cgi but it doesn't display domainb.com in the location it displays domaina.com/domainb

          How would I make it say domainb.com in the location?

          I read some text at http://httpd.apache.org/docs/vhosts/examples.html

          about apache, but I am just confused.



          Thanks,

          Will


          Normally This is DOne in DNS.

          You might want to learn Bind It is not a Easy task one little messup will crash the whole thing
          XR Networks
          Dedicated | VPS | Shared Hosting
          ICQ 42602565

          Comment

          • hyper
            Confirmed User
            • Mar 2002
            • 5294

            #6
            Originally posted by GFED
            is this insrted in my .htaccess file?
            yes

            Comment

            • GFED
              Confirmed User
              • May 2002
              • 8121

              #7
              Originally posted by hyper

              yes
              It takes away my permission to view the page...
              https://www.flow.page/savethechildren

              Comment

              Working...