.htaccess and RewriteRule

Discussion in 'Programming' started by THT, Feb 8, 2007.

  1. #1
    Im using the options in the title to do the following:

    
    RewriteRule ^forum$ http://www.ps3peak.com/Forum/ [R=301]
    RewriteRule ^forum/(.*)$ http://www.ps3peak.com/Forum/$1 [R=301]
    RewriteRule ^Forum/forums.* Forum/index.php [L,NC]
    RewriteRule ^Forum/post-([0-9]*).html&highlight=([a-zA-Z0-9]*) Forum/viewtopic.php?p=$1&highlight=$2 [L,NC]
    RewriteRule ^Forum/post-([0-9]*).* Forum/viewtopic.php?p=$1 [L,NC]
    RewriteRule ^Forum/view-poll([0-9]*)-([0-9]*)-([a-zA-Z]*).* Forum/viewtopic.php?t=$1&postdays=$2&postorder=$3&vote=viewresult [L,NC]
    RewriteRule ^Forum/about([0-9]*).html&highlight=([a-zA-Z0-9]*) Forum/viewtopic.php?t=$1&highlight=$2 [L,NC]
    RewriteRule ^Forum/about([0-9]*).html&view=newest Forum/viewtopic.php?t=$1&view=newest [L,NC]
    RewriteRule ^Forum/about([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* Forum/viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 [L,NC]
    RewriteRule ^Forum/about([0-9]*)-([0-9]*).* Forum/viewtopic.php?t=$1&start=$2 [L,NC]
    RewriteRule ^Forum/about([0-9]*).* Forum/viewtopic.php?t=$1 [L,NC]
    RewriteRule ^Forum/about([0-9]*).html Forum/viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L,NC]
    RewriteRule ^Forum/forum-([0-9]*).html Forum/viewforum.php?f=$1 [L,NC]
    RewriteRule ^Forum/forum-([0-9]*).* Forum/viewforum.php?f=$1 [L,NC]
    RewriteRule ^Forum/mark-forum([0-9]*).html* Forum/viewforum.php?f=$1&mark=topics [L,NC]
    RewriteRule ^Forum/updates-topic([0-9]*).html* Forum/viewtopic.php?t=$1&watch=topic [L,NC]
    RewriteRule ^Forum/stop-updates-topic([0-9]*).html* Forum/viewtopic.php?t=$1&unwatch=topic [L,NC]
    RewriteRule ^Forum/topic-([0-9]*)-([0-9]*)-([0-9]*).* Forum/viewforum.php?f=$1&topicdays=$2&start=$3 [L,NC]
    RewriteRule ^Forum/ptopic([0-9]*).* Forum/viewtopic.php?t=$1&view=previous [L,NC]
    RewriteRule ^Forum/ntopic([0-9]*).* Forum/viewtopic.php?t=$1&view=next [L,NC]
    
    Code (markup):
    Recently, ive been geting a lot of 404s (i get email alerts when theres 404), for :
    www.XXXX.com/forum-1.html
    www.XXXX.com/Forum/forumdisplay.php?f=185
    http://www.XXXX.com//www.XXXX.com//www.XXXX.com/Forum/forumdisplay.php?f=149

    Im concerned these could be caused by my rules.... anything obvious?
     
    THT, Feb 8, 2007 IP
  2. Munk

    Munk Peon

    Messages:
    56
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I typically get great help on mod_rewrite here http://forum.modrewrite.com/
     
    Munk, Feb 10, 2007 IP