Results 1 to 10 of 10
  1. #1
    Join Date
    May 2003
    Location
    Planet Earth
    Posts
    113

    Mapping 1 domain to another.

    I have a domain eg. mydomain.com and bought another eg. mydomains.com.

    Is there anyway i can map mydomains.com to mydomain.com such that if anyone types:

    mydomains.com/something/blar.php, it will redirect to: mydomain.com/something/blar.php

    is this possible?

  2. #2
    Join Date
    Nov 2002
    Location
    Central Florida, USA
    Posts
    380
    If you want the actual domain to change, not just share the same content the easiest way would likely be .htaccess. If you have cpanel as your hosting control panel you can create this with the redirection option in cpanel.

    Or you could created a file in your web directory called
    .htaccess and add the following:

    RedirectMatch mydomains.com/something/blar.php mydomain.com/something/blar.php

    All on the same line with a space between the two domains.
    Rob
    Founder and former owner of SRLnet. Sold in 2006

  3. #3
    Join Date
    Jun 2003
    Location
    Norway
    Posts
    206
    Do you want it to redirect, or only show the same pages?

    If you want both domains to show same content, you can
    add a parked domain.

    If you need forewarding, a little php or perl script
    would be a good solution.

    Feel free to message me if you need a script for that. It`s
    only a few lines, and I could write one for you for free.
    Handy Host - Shared Web Hosting
    http://www.handyhost.com - 24/7 support, 99.9% uptime guarantee, instant setup - support@handyhost.com

  4. #4
    Join Date
    Jun 2003
    Location
    Norway
    Posts
    206
    Ops, SRLHosting you beat me to it
    Handy Host - Shared Web Hosting
    http://www.handyhost.com - 24/7 support, 99.9% uptime guarantee, instant setup - support@handyhost.com

  5. #5
    Join Date
    Nov 2002
    Location
    Central Florida, USA
    Posts
    380
    Not quite, different solutions.
    Rob
    Founder and former owner of SRLnet. Sold in 2006

  6. #6
    Join Date
    Jun 2003
    Location
    Norway
    Posts
    206
    Yes. Your solutions sound better. I just made up a solution with the perl script that would require nothing else from server than perl or php access. Also thought he wanted a generic solution for all domains. Probably that can also be done using .htaccess ?
    Handy Host - Shared Web Hosting
    http://www.handyhost.com - 24/7 support, 99.9% uptime guarantee, instant setup - support@handyhost.com

  7. #7
    Join Date
    May 2003
    Location
    Planet Earth
    Posts
    113
    I am looking for one that will forward one domain to another.

    If i use .htaccess, do I have to create entries for each URL I want to forward? As there will be a forum, blog.

    thanks
    Hello World!

  8. #8
    Join Date
    Nov 2002
    Location
    Central Florida, USA
    Posts
    380
    .htaccess does support wildcards, so you may be able to work something out with that.

    Here is a link to some .htaccess tips. http://www.javascriptkit.com/howto/htaccess.shtml
    Rob
    Founder and former owner of SRLnet. Sold in 2006

  9. #9
    Join Date
    May 2003
    Location
    Planet Earth
    Posts
    113
    Originally posted by SRLHosting
    .htaccess does support wildcards, so you may be able to work something out with that.

    Here is a link to some .htaccess tips. http://www.javascriptkit.com/howto/htaccess.shtml
    thanks for the link. Great tut about .htaccess.

    thank you.
    Hello World!

  10. #10
    Join Date
    Feb 2004
    Posts
    772
    Hi,

    Write a redirection in .htaccess file as follows.

    redirect permanent /something/blar.php

    mydomain.com/something/blar.php

    So, that if you give this URL mydomains.com/something/blar.php, it will automatically redirect to mydomain.com/something/blar.php

    Regards.

Posting Permissions

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