mod_rewrite / phpbb forums / godaddy hosting / help

Discussion in 'Apache' started by MediaHustler, Feb 25, 2007.

  1. #1
    Ok well I just did a phpbb mod to my phpbb forums that rewrote the url to put the title in the url

    http://www.gamefrat.com/forums/

    Obviously it changes the link but it doesn't actually work. It's just not rewriting the url. This is the contents of my .htaccess which is in foler "/forums/".

    <Files config.php> 
    Deny from all 
    </Files> 
    
    DirectoryIndex index.php index.html index.htm
    
    RewriteEngine On
    
    # SEO URL [mgutt]
    RewriteRule !\.html$ - [L]
    RewriteRule ^forums/[a-z0-9-]+-([pt])([0-9]+)\.html$ /forums/viewtopic.php?$1=$2 [L]
    RewriteRule ^forums/[a-z0-9-]+-f([0-9]+)\.html$ /forums/viewforum.php?f=$1 [L]
    RewriteRule ^forums/[a-z0-9-]+-c([0-9]+)\.html$ /forums/index.php?c=$1 [L]
    RewriteRule ^forums/[a-z0-9-]+-u([0-9]+)\.html$ /forums/profile.php?mode=viewprofile&u=$1 [L]
    RewriteRule ^forums/([a-zA-Z0-9_]+),([^/,]+),([^/,]*)([^/]*\.html)$ forums/$1$4?$2=$3 [QSA,N]
    RewriteRule ^forums/[a-z0-9-]+-([pt])([0-9]+),([^/,]+),([^/,]*)([^/]*\.html)$ forums/viewtopic$5?$1=$2&$3=$4 [QSA,N]
    RewriteRule ^forums/[a-z0-9-]+-f([0-9]+),([^/,]+),([^/,]*)([^/]*\.html)$ forums/viewforum$4?f=$1&$2=$3 [QSA,N]
    RewriteRule ^forums/([a-zA-Z0-9_]+)\.html$ /forums/$1.php [L]
    Code (markup):
    Help. What's going wrong? =(
     
    MediaHustler, Feb 25, 2007 IP
  2. kapengbarako

    kapengbarako Peon

    Messages:
    914
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You may want to insert
    RewriteBase /
    Code (markup):
    after RewriteEngine On
     
    kapengbarako, Feb 25, 2007 IP
  3. MediaHustler

    MediaHustler Well-Known Member

    Messages:
    1,857
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    120
    #3
    Done. But still nothing.

    =(
     
    MediaHustler, Feb 25, 2007 IP
  4. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #4
    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^forums/([^.]+)([^.]+),([^.]+),([^.]+)([^.]+)\.html)$ forums/viewtopic$5?$1=$2&$3=$4 [QSA,N]
    RewriteRule ^forums/([^.]+),([^.]+),([^.]+)([^.]+)\.html)$ forums/$1$4?$2=$3 [QSA,N]
    RewriteRule ^forums/([^.]+),([^.]+),([^.]+)([^.]+)\.html)$ forums/viewforum$4?f=$1&$2=$3 [QSA,N]
    RewriteRule ^forums/([^.]+)([^.]+)\.html$ forums/viewtopic.php?$1=$2 [L]
    RewriteRule ^forums/([^.]+)\.html$ forums/viewforum.php?f=$1 [L]
    RewriteRule ^forums/([^.]+)\.html$ forums/index.php?c=$1 [L]
    RewriteRule ^forums/([^.]+)\.html$ forums/profile.php?mode=viewprofile&u=$1 [L]
    RewriteRule ^forums/([^.]+)\.html$ forums/$1.php [L]

    for the last four lines they'll never work unless you add something unique to each of them, like a different extension or a directory name change.

    For

    RewriteRule ^forums/([^.]+)([^.]+)\.html$ forums/viewtopic.php?$1=$2 [L]

    you don't need the $1 part, since it's the same in every URL.

    RewriteRule ^forums/([^.]+),([^.]+),([^.]+)([^.]+)\.html)$ forums/viewforum$4?f=$1&$2=$3 [QSA,N]

    Why is $4 there??? I'm guessing it's viewforum?f= in the URL.

    RewriteRule ^forums/([^.]+),([^.]+),([^.]+)([^.]+)\.html)$ forums/$1$4?$2=$3 [QSA,N]

    will never work, cause apache will have no idea which script that's for!!!

    Post an orignal URL and the mod_rewrite URL for each type of URL.
     
    Nintendo, Feb 26, 2007 IP
  5. MediaHustler

    MediaHustler Well-Known Member

    Messages:
    1,857
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    120
    #5
    Hey Nintendo. I have no idea what any of that means =(. This is from a phpbb mod I got from here.

    http://www.phpbb.com/phpBB/viewtopic.php?t=407141&highlight=seo
     
    MediaHustler, Feb 26, 2007 IP
  6. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #6
    Make a post in that thread. The thread starter is still there. He's the last one to post their.
     
    Nintendo, Feb 26, 2007 IP
  7. MediaHustler

    MediaHustler Well-Known Member

    Messages:
    1,857
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    120
    #7
    Do I have to install Apache on my server or something?
     
    MediaHustler, Feb 26, 2007 IP
  8. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #8
    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^forums/wacko\.html$ forums/index.php [L]

    domain.com/forums/wacko.html should show the index page...if you have mod_rewrite.
     
    Nintendo, Feb 26, 2007 IP
  9. MediaHustler

    MediaHustler Well-Known Member

    Messages:
    1,857
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    120
    #9
    Doesn't show. =(

    Guess I don't have it.
     
    MediaHustler, Feb 27, 2007 IP
  10. ac_roma

    ac_roma Guest

    Messages:
    173
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #10
    try use austin mod for php mod rewrite
     
    ac_roma, Mar 2, 2007 IP
  11. MediaHustler

    MediaHustler Well-Known Member

    Messages:
    1,857
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    120
    #11
    I just learned with the Economic hosting plan GoDaddy does not have Mod_Rewrite only with the Deluxe plan and up.

    Bahhhhh!!!
     
    MediaHustler, Mar 2, 2007 IP