Skip to:
Content
Pages
Categories
Search
Top
Bottom

Help with mod rewrite

  • Hello,

    I’ve changed the mod rewrite rules and manage to name the forum after the forum name:

    I have:

    http://www.dfur.com/designer_furniture – first forum page

    http://www.dfur.com/designer_furniture/page/2 – second forum page

    Now I have the .htaccess done as following:

    RewriteRule ^designer_furniture /forum.php?id=1 [L,QSA] – for the first forum page

    RewriteRule ^designer_furniture/page/([0-9]+)$ /forum.php?id=$1&page=$2 [L,QSA] – second forum page

    The first mod rewrite rule works but the second just redirect me back to the main forum. What can I do to fix this?

    Thanx,

    Mircea.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I really do not understand,

    http://www.dfur.com/designer_furniture/page/2 redirects 301 to http://www.dfur.com/designer_furniture.

    Why is this? I have no 301 in htaccess!!! Is this a bbPress thing?

    URL=http://www.dfur.com/designer_furniture/page/2

    Result code: 301 (MovedPermanently / Moved Permanently)

    I found a 301 redirect in bb-includes/functions.php

    Now how to get rid of it??? This 301 keeps me from jumping to page2

    if ( 1 === bb_get_option( ‘debug’ ) ) :

    echo “<table>n<tr><td>”. __(‘REQUEST_URI’) .”:</td><td>”;

    var_dump($uri);

    echo “</td></tr>n<tr><td>”. __(‘should be’) .”:</td><td>”;

    var_dump($check);

    echo “</td></tr>n<tr><td>”. __(‘full permalink’) .”:</td><td>”;

    var_dump($permalink);

    echo “</td></tr>n<tr><td>”. __(‘PATH_INFO’) .”:</td><td>”;

    var_dump($_SERVER);

    echo “</td></tr>n</table>”;

    else :

    if ( $check != $uri ) {

    if ( version_compare(phpversion(), ’4.3.0′, ‘>=’) ) {

    header(“Location: $permalink”, true, 301);

    } else {

    header(“Location: $permalink”);

    status_header( 301 );

    }

    exit;

    }

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.