need help with .htaccess

Discussion in 'Apache' started by nikki_03, Oct 9, 2006.

  1. #1
    Hi everyone,

    I got hosting with powweb.com, and i got 2 domains on there, but I want the second domain to be directed to another content.

    Right now they both direct to 1 content.

    The htaccess is within powweb itself, which is pretty easy to simply get in that editor and add whatever you like.

    Could someone tell me what I need to add to make domain#2 direct to content#2??

    Thanks
    Nikki
     
    nikki_03, Oct 9, 2006 IP
  2. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #2
    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

    might do it.
     
    Nintendo, Oct 9, 2006 IP
  3. nikki_03

    nikki_03 Peon

    Messages:
    92
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    ok so i add that in the main editor? But where would i upload the contents for domain#2 ? I have to create some kind of folder for it no?
     
    nikki_03, Oct 9, 2006 IP
  4. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #4
    You don't do anything to the domain you redirect everything to.

    Only on domain.com/.htaccess that you want to move visitors away from.
     
    Nintendo, Oct 9, 2006 IP
  5. nikki_03

    nikki_03 Peon

    Messages:
    92
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    hmm this doesn't seem to work. I don't understand how this would work if it is not directing to a specific folder?

    Any other suggestions??
     
    nikki_03, Oct 9, 2006 IP
  6. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #6
    Try this little test..

    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^wacko\.html$ index.html [L]

    with index.html being what ever the index file hame is. See if you can go to domain.com/wacko.html If you can't, you can't use mod_rewrite/.htaccess.
     
    Nintendo, Oct 9, 2006 IP