.htaccess subdomains

Discussion in 'Apache' started by ExtremeData, Jul 20, 2008.

  1. #1
    Hello,
    I need some help with .htaccess
    I want to redirect a directory to subdomain.
    Example : site.com/forum to forum.site.com, site.com/download to download.site.com etc...
    I can pay but I don`t have a big budget.
    Please post here or PM me if you can help me.
    Thanks.
     
    ExtremeData, Jul 20, 2008 IP
  2. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #2
    Hello,

    This should work:
    RewriteEngine On
    RewriteRule ^(.*?)/?$ http://$1\.pastebin\.com [R]
    Code (markup):
    That should redirect www.mysite.com/test to test.pastebin.com

    Jay
     
    jayshah, Jul 21, 2008 IP
  3. ExtremeData

    ExtremeData Well-Known Member

    Messages:
    450
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    125
    #3
    Not work for me.

     
    ExtremeData, Jul 21, 2008 IP
  4. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #4
    It works here. Please check you copied/pasted it correctly.

    Jay
     
    jayshah, Jul 21, 2008 IP
  5. ExtremeData

    ExtremeData Well-Known Member

    Messages:
    450
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    125
    #5
    On hostgator not work.
    500 Internel error.
    This is not allowed on hostgator or what ?
    I will contact hostgator support.
     
    ExtremeData, Jul 22, 2008 IP