sub domain htaccess

Discussion in 'Apache' started by love_bug, Apr 14, 2007.

  1. #1
    hi,

    i previously i had a folder like this : http://www.mysite.com/dir
    in dir folder i had a mod rewrite .htaccess , which worked fine, all the redirections worked fine...

    RewriteEngine on
    RewriteRule ^go-(.*)-(.*).html$ index.php?go=$1&id=$2 [L,NC]
    RewriteRule ^(.*)-(.*)-(.*).html$ index.php?go=$2&id=$3 [L,NC]
    RewriteRule ^([0-9]+)/[^/]+/([0-9]+)/$ index.php?go=subcat&id=$1&pageNum_pages=$2 [L,NC]
    RewriteRule ^([0-9]+)/.*$ index.php?go=subcat&id=$1 [L,NC]
    Code (markup):
    but recently i decided to make this dir folder a sub domain...using DNS editor
    which is http://dir.mysite.com

    suddenly htaccess rewrite rule stopped working... in http://dir.mysite.com
    i dont understand... is there something missing?
    i checked out this http://tips-scripts.com/?tip=pointing#tip but couldnt understand anything.. please help.
     
    love_bug, Apr 14, 2007 IP
  2. vagrant

    vagrant Peon

    Messages:
    2,284
    Likes Received:
    181
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i don't know much about rewrite, but the ones i have in sub domains all have the line
    after the RewriteEngine on
     
    vagrant, Apr 14, 2007 IP
  3. love_bug

    love_bug Member

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    it's weird, dir.mysite.com/index.php?id=1&cat=2 works fine, all images are displayed, but dir.mysite.com/1/2 wont work!!
     
    love_bug, Apr 14, 2007 IP
  4. love_bug

    love_bug Member

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #4
    oh thankyou ...
    it was indeed needed...
     
    love_bug, Apr 14, 2007 IP