Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: HTAccess?

  1. #1
    Join Date
    May 2005
    Location
    /etc/passwd
    Posts
    19,110
    Tokens
    1,139

    Latest Awards:

    Default HTAccess?

    Hello,

    What code would I put in a .htaccess file to redirect www.DOMAIN.tld/forum to www.forum.DOMAIN.tld ?

    Thanks
    Tom

    Moved by opensourcehost (Forum Moderator) from Web Designing: Please post in the correct forum next time, thanks .
    Last edited by Mr.OSH; 06-07-2007 at 04:21 PM.
    Quote Originally Posted by Chippiewill View Post
    e-rebel forum moderator
    :8

  2. #2
    Join Date
    Apr 2006
    Location
    London, England
    Posts
    696
    Tokens
    0

    Default

    Create a .htaccess file with the code below. The .htaccess file needs to be in your root directory preferably where your index page is

    Code:
     Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) http://www.NEWDOMAIN.COM/$1 [R=301,L]
    change NEWDOMAIN.COM with your new domain you wish to link to.

    This method only works on linux servers tho.
    ;veni vidi vici
    ;i came, i saw, i ownt

  3. #3
    Join Date
    Mar 2007
    Location
    Kent
    Posts
    11,415
    Tokens
    787

    Latest Awards:

    Default

    then its abit rubbish ^^ lol.

    use cpanel redirect page, does it for you.

  4. #4
    ScottDiamond Guest

    Default

    Quote Originally Posted by Hollywood View Post
    then its abit rubbish ^^ lol.

    use cpanel redirect page, does it for you.
    And cPanel redirect page isn't rubbish? Deary me. What propaganda do they pipe into you?

  5. #5
    Join Date
    Jul 2004
    Location
    Sunshine Coast, Queensland, AU
    Posts
    1,830
    Tokens
    467

    Latest Awards:

    Default

    Cpanel's one your hardly even realise its redirecting

  6. #6
    ScottDiamond Guest

    Default

    Quote Originally Posted by Rix View Post
    Cpanel's one your hardly even realise its redirecting
    Oh no. Oh no. Oh no.

  7. #7
    Join Date
    May 2007
    Location
    Nebo, NC, USA
    Posts
    2,517
    Tokens
    0

    Latest Awards:

    Default

    PHP Code:
    <?
    header
    ("Location: http://bob.com");
    ?>

  8. #8
    Join Date
    Jul 2005
    Posts
    1,653
    Tokens
    50

    Latest Awards:

    Default

    DUB's code is best.

  9. #9
    Join Date
    Jun 2004
    Location
    London
    Posts
    116
    Tokens
    0

    Default

    If you cannot get the .htaccess code to work try this:

    Make a file called index.html in the /forum directory and add this line in your head.
    Code:
    <meta http-equiv="refresh" content="0;URL=www.forum.DOMAIN.tld">

  10. #10
    Join Date
    Apr 2006
    Location
    London, England
    Posts
    696
    Tokens
    0

    Default

    that isn't what he's asking though. .htaccess is much more efficient
    Last edited by DUB; 08-07-2007 at 11:46 PM.
    ;veni vidi vici
    ;i came, i saw, i ownt

Page 1 of 2 12 LastLast

Posting Permissions

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