Mod rewrite help, please

Discussion in 'Apache' started by fryman, Jul 19, 2005.

  1. #1
    Wow, I hate mod rewrite, everytime I try it I end up with a dead site...

    so, I need to do a 301 redirect, move www.domain.com to www.domain.com/forum

    Could someone let me know the code I need to add to my .htaccess file?

    Thanks
     
    fryman, Jul 19, 2005 IP
  2. SEbasic

    SEbasic Peon

    Messages:
    6,317
    Likes Received:
    318
    Best Answers:
    0
    Trophy Points:
    0
    #2
    SEbasic, Jul 19, 2005 IP
  3. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #3
    Nope, that didn't work... anyone else?? :D
     
    fryman, Jul 19, 2005 IP
  4. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #4
    Two examples. One covers a whole directory, and the second one covers just one file.

    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^shop/(.*)$ http://www.amazon.com/exec/obidos/ASIN/$1/ref=nosim/me-20 [R=301,L]

    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^Google_Cash/$ http://hop.clickbank.net/?me/googlecash [R=301,L]
     
    Nintendo, Jul 19, 2005 IP
  5. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #5
    fryman, Jul 19, 2005 IP
  6. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #6
    (Mac instructions.)

    Now now Wacko Junior, simply copy the code below.

    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^forums/$ http://www.domain.com/forums/ [R=301,L]

    *How do I do that daddy?* :D

    Highlight the text below and then press Control+C.

    *How do I highlight text pappa?*

    Place the little | mark right before Options and hold the button down and move your mouse, er computer mouse down until all the text is high-lighted. Then Press Control+C.

    *Does it*

    Good little boy!! You have now copied the text. Now make a .htaccess file that's empty and paste it in to the file.

    *How do I do that wacky daddy?* :D

    Place the | mark in the .htaccess file and press Control+V. There the text showed up. Now change domain.com to your domain. Now save the file.

    *How do I save it King of da Wackos, er daddy?* :D

    Press Control+S to save it.

    Now, do u need instructions to upload it??!!

    er when did I give you a domain??!! U are too young to have your own domain!! :D
     
    Nintendo, Jul 19, 2005 IP