Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Apr 2008
    Posts
    95
    Thanks
    20
    Thanked 0 Times in 0 Posts

    Redirection without cloaking

    I want to redirect www.seconddomain.com to a sub directory inside the the main domain.

    firstdomain.com points to the root - public_html
    seconddomain.com should redirect to - public_html/foldername

    I have the seconddomain.com parked and redirected through cpanel. if someone enters seconddomain.com I want it to show up as www.firstdomain.com/foldername
    how can I achieve this through .htaccess

    thanks

  • #2
    Regular Coder jdswebservice's Avatar
    Join Date
    Aug 2010
    Location
    Moon Township, PA
    Posts
    107
    Thanks
    0
    Thanked 5 Times in 5 Posts
    why would you want it to show up like that? and secondly i dont believe you can through htaccess... You can use a php redirect script if you really wanted to...

    index.php (on seconddomain.com)
    Code:
    <?php
    header("refresh: 0; http://firstdomain.com");
    ?>
    Should be a little latency but shouldn't be a HUGE deal and it will accomplish what you're trying to do...

    Thanks,
    J-

  • Users who have thanked jdswebservice for this post:

    ksduded (04-04-2011)


  •  

    Posting Permissions

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