Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2004
    Location
    India
    Posts
    491

    Masking my subdomain redirection

    I am having a problem to musk my domain that I want to forward to a differnt one and still want people to see my subdomain in there browser.

    I am forwarding http://subdomain.abc.com to http://clients.xyz.com

    and it is showing http://clients.xyz.com in the browser as ususal.

    But I still want it to so http://subdomain.abc.com instead.

    There must something, that I can do in my .htaccess. Please let me know.
    ESC :wq!

  2. #2
    Join Date
    Mar 2005
    Location
    Cardiff, Wales, UK
    Posts
    45
    You can't do it using .htaccess files, or anything associated with Apache. Apache will do a full redirect of the browser, by send it to another page automatically, like clicking a link.

    If you want to 'keep' the name of initial domain in the address bar, you are going to have to create a frameset page with the internal frame pointing to the new domain.

    The page will load inside the frame from the first domain and all clicks will be contined in the frame (unless told otherwise), so the first domain will always stay in the browser address bar.
    Jonathan Wright (Technical Director, JAB Web Solutions Limited).

    UK Hosting and Reseller Hosting from JAB Web Solutions

  3. #3
    Join Date
    Nov 2003
    Location
    Canada
    Posts
    881
    Or use a domain alias. Some control panels let you do this, otherwise it needs to be done in the apache configuration.

    Basically, you need both domains on the same server. Next make sure you delete the subdomain "subdomain.abc.com", that way it won't get mixed up with the new alias. Note you will still need "subdomain.abc.com" in your DNS entries.

    Next add an alias for that domain in your httpd.conf. The first two lines of the virtual host section for that subdomain will look like this:

    ServerName clients.xyz.com
    ServerAlias www.clients.xyz.com

    Or similar. Add a space then "subdomain.abc.com" on the second line. Once your done reload apache and its finished. Everyone who goes to subdomain.abc.com will see the same information as if they went to clients.xyz.com.

  4. #4
    Join Date
    Oct 2004
    Location
    India
    Posts
    491
    This is basically a html frame based solution. But I was looking for a httpd base or DNS based solution
    ESC :wq!

  5. #5
    Join Date
    Mar 2005
    Location
    Cardiff, Wales, UK
    Posts
    45
    Originally posted by u2mike
    ServerName clients.xyz.com
    ServerAlias www.clients.xyz.com
    True - didn't think about that, although you can't put this into a .htaccess file. You need to have direct access to the vhost configuration.
    Jonathan Wright (Technical Director, JAB Web Solutions Limited).

    UK Hosting and Reseller Hosting from JAB Web Solutions

  6. #6
    Join Date
    Oct 2004
    Location
    India
    Posts
    491
    Unfortunately the second domain that I am forwarding to is not in my server. It is on another server and I have no control over it either
    ESC :wq!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •