Skip to:
Content
Pages
Categories
Search
Top
Bottom

remove forum/”topic”/number

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

  • fel64
    Member

    @fel64

    My default is actually http://www.example.com/topic/topicnumber.

    It is possible to have topic-title in the link instead of the number, but you need to be running the very latest version of bbPress from SVN, which is likely to be buggier than the official releases. The Download page has both.


    Trent Adams
    Member

    @trent

    You can check out the new link structure on my site. http://onvertigo.com has the new permalink structure.

    Trent


    cocowawa
    Member

    @cocowawa

    Oh! I like it! Trent

    Could you give me your code please? or say me what are you doing

    Thanks!


    fel64
    Member

    @fel64

    Open your config.php file and change line 26 (I think) to

    $bb->mod_rewrite = 'slugs';

    (It should have been $bb->mod_rewrite = [true or false] before.)

    Put the following code in your .htaccess file:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^forum/(.+)/page/([0-9]+)$ /forum.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^forum/(.+)/?$ /forum.php?id=$1 [L,QSA]
    RewriteRule ^topic/(.+)/page/([0-9]+)$ /topic.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^topic/(.+)/?$ /topic.php?id=$1 [L,QSA]
    RewriteRule ^tags/(.+)/page/([0-9]+)$ /tags.php?tag=$1&page=$2 [L,QSA]
    RewriteRule ^tags/(.+)/?$ /tags.php?tag=$1 [L,QSA]
    RewriteRule ^tags/?$ /tags.php [L,QSA]
    RewriteRule ^profile/(.+)/page/([0-9]+)$ /profile.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^profile/(.+)/([a-z]+)$ /profile.php?id=$1&tab=$2 [L,QSA]
    RewriteRule ^profile/(.+)/([a-z]+)/page/([0-9]+)$ /profile.php?id=$1&tab=$2&page=$3 [L,QSA]
    RewriteRule ^profile/(.+)/?$ /profile.php?id=$1 [L,QSA]
    RewriteRule ^view/([a-z-]+)/page/([0-9]+)$ /view.php?view=$1&page=$2 [L,QSA]
    RewriteRule ^view/([a-z-]+)$ /view.php?view=$1 [L,QSA]
    RewriteRule ^rss/$ /rss.php [L,QSA]
    RewriteRule ^rss/forum/([0-9]+)$ /rss.php?forum=$1 [L,QSA]
    RewriteRule ^rss/topic/([0-9]+)$ /rss.php?topic=$1 [L,QSA]
    RewriteRule ^rss/tags/([a-z]+)$ /rss.php?tag=$1 [L,QSA]
    RewriteRule ^rss/profile/([0-9]+)$ /rss.php?profile=$1 [L,QSA]
    </IfModule>


    Trent Adams
    Member

    @trent

    Once 1.0 comes out, it will be a standard part of the release. There was much discussion on how to include a ‘prettier permalinks’ structure into bbPress and this was agreed upon and is committed to the TRAC development version of bbPress. I personally love it!

    Trent


    cocowawa
    Member

    @cocowawa

    fel64, this dont work the urlĀ“s link dont change and then error404

    i am adapting code to do a unique forum (without forums!) you con see: http://www.todopiscinasQQQ.es/foro/ (remove QQQ)

    Whats are wrong?

    Trent i hope to do this now but i thing i need to wait for 1.0 and my code dont works then.


    Trent Adams
    Member

    @trent

    It works if you are willing to download the latest TRAC version from https://trac.bbpress.org/browser/trunk/ and then scrolling down to the bottom of the page and clicking the ‘download in other format – Zip format’. That is the latest development version. Then you have to change your config.php to have:

    $bb->mod_rewrite = 'slugs';

    Your .htaccess file should just be back to whatever you had before. Mine is just the + MultiViews part.

    Trent

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar