Skip to:
Content
Pages
Categories
Search
Top
Bottom

Pretty Permalinks Not Working


  • laemo
    Member

    @laemo

    Hello,

    I have read the FAQ here: http://bbpress.org/documentation/faq/#pretty-permalinks

    and I have tried both, using Options +MultiViews and also using the code generated by /bb-admin/rewrite-rules.php but I cannot seem to get my permalinks working.

    http://www.nmimsieee.com/forums/ is the link to my forums.

    I am using GoDaddy for hosting. I have set $bb->mod_rewrite = true in my config.php and my forums are in the same database as WordPress.

    I recently migrated my forums to my WordPress database, and I did the same at home (I have a server running on my laptop, and I just loaded all the data onto the domain mentioned above).

    Permalinks work fine at home on my WAMP setup. However on my domain at GoDaddy, I get an error saying “No input file specified.”

    Could anyone please help me out and tell me where am I going wrong? I would really appreciate it.

Viewing 25 replies - 26 through 50 (of 51 total)
  • not a directory issue:

    .htaccess is in lankapod/forum/ folder this is the same folder bbpress is in as well.

    > .htaccess is in lankapod/forum/ folder

    That’s good, but is there a .htaccess in your base ( lankapod/ ) directory?

    no, but i was getting ready to create one there thinking that might be the issue.

    How should I modify my .htaccess to accomodate a bbpress install in a /forums/ subdirectory? The install worked but permalinks aren’t.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    I have now installed wordpress2.3 at http://new.tnlotteryresults.com/ and bbpress 0.8.3 at http://talk.tnlotteryresults.com/ They are located in two physically separate directories using two different databases with no .htaccess in any parent directory. Matter of fact, all parent directories between root and each of the sites are empty. Pretty permalinks work on http://new.tnlotteryresults.com/ and fail on http://talk.tnlotteryresults.com/

    I have edited the .htaccess with both methods shown in the installation instructions as well as making sure that I had ‘slugs’ in the config.php

    Why does WordPress implement pretty permalinks so easily and bbpress is so resistant?


    chrishajer
    Participant

    @chrishajer

    Can you post your .htaccess?

    This is the most recent .htaccess based upon /bb-admin/rewrite-rules.php:

    <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/([^/]+)/([^/]+)/?$ /profile.php?id=$1&tab=$2 [L,QSA]

    RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ /profile.php?id=$1&tab=$2&page=$3 [L,QSA]

    RewriteRule ^profile/([^/]+)/?$ /profile.php?id=$1 [L,QSA]

    RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ /view.php?view=$1&page=$2 [L,QSA]

    RewriteRule ^view/([^/]+)/?$ /view.php?view=$1 [L,QSA]

    RewriteRule ^rss/?$ /rss.php [L,QSA]

    RewriteRule ^rss/forum/([^/]+)/?$ /rss.php?forum=$1 [L,QSA]

    RewriteRule ^rss/topic/([^/]+)/?$ /rss.php?topic=$1 [L,QSA]

    RewriteRule ^rss/tags/([^/]+)/?$ /rss.php?tag=$1 [L,QSA]

    RewriteRule ^rss/profile/([^/]+)/?$ /rss.php?profile=$1 [L,QSA]

    </IfModule>

    I also tried:

    Options +MultiViews

    And here’s the config.php

    <?php

    // ** MySQL settings ** //

    define(‘BBDB_NAME’, ‘CORRECT’); // The name of the database

    define(‘BBDB_USER’, ‘CORRECT’); // Your MySQL username

    define(‘BBDB_PASSWORD’, ‘CORRECT’); // …and password

    define(‘BBDB_HOST’, ‘CORRECT’); // 99% chance you won’t need to change these last few

    define(‘BBDB_CHARSET’, ‘utf8’); // If you are *upgrading*, and your old config.php does

    define(‘BBDB_COLLATE’, ”); // not have these two contstants in them, DO NOT define them

    // If you are installing for the first time, leave them here

    // Change the prefix if you want to have multiple forums in a single database.

    $bb_table_prefix = ‘bb_’; // Only letters, numbers and underscores please!

    // The full URL of your bbPress install

    $bb->uri = ‘http://talk.tnlotteryresults.com/&#8217;;

    // What are you going to call me?

    $bb->name = ‘Discuss the Tennessee Lottery’;

    // This must be set before you run the install script.

    $bb->admin_email = ‘juggler@gmail.com’;

    // Set to true if you want pretty permalinks, set to ‘slugs’ if you want to use slug based pretty permalinks.

    $bb->mod_rewrite = ‘slugs’;

    // The number of topics that show on each page.

    $bb->page_topics = 30;

    // A user can edit a post for this many minutes after submitting.

    $bb->edit_lock = 60;

    // Your timezone offset. Example: -7 for Pacific Daylight Time.

    $bb->gmt_offset = -5;

    // Change this to localize bbPress. A corresponding MO file for the

    // chosen language must be installed to bb-includes/languages.

    // For example, install de.mo to bb-includes/languages and set BBLANG to ‘de’

    // to enable German language support.

    define(‘BBLANG’, ”);

    // Your Akismet Key. You do not need a key to run bbPress, but if you want to take advantage

    // of Akismet’s powerful spam blocking, you’ll need one. You can get an Akismet key at

    // http://wordpress.com/api-keys/

    $bb->akismet_key = ‘0123456789ab’; // Example: ‘0123456789ab’

    // The rest is only useful if you are integrating bbPress with WordPress.

    // If you’re not, just leave it as it is.

    $bb->wp_table_prefix = ”; // WordPress table prefix. Example: ‘wp_’;

    $bb->wp_home = ‘http://new.tnlotteryresults.com&#8217;; // WordPress – Options->General: Blog address (URL) // Example: ‘http://example.com&#8217;

    $bb->wp_siteurl = ‘http://new.tnlotteryresults.com&#8217;; // WordPress – Options->General: WordPress address (URL) // Example: ‘http://example.com&#8217;

    //The following allow users from the WordPress blog to mix with the bbpress users

    define(‘USER_BBDB_NAME’,’CORRECT_BUT_DIFFERENT_THAN_ABOVE’);

    define(‘USER_BBDB_USER’,’CORRECT_BUT_DIFFERENT_THAN_ABOVE’);

    define(‘USER_BBDB_PASSWORD’,’CORRECT_BUT_DIFFERENT_THAN_ABOVE’);

    define(‘USER_BBDB_HOST’,’CORRECT_BUT_DIFFERENT_THAN_ABOVE’);

    /* Stop editing */

    if ( !defined(‘BBPATH’) )

    define(‘BBPATH’, dirname(__FILE__) . ‘/’ );

    require_once( BBPATH . ‘bb-settings.php’ );

    ?>

    Thanks for gandering!

    To eliminate WordPress as a possible problem, I have tried a fresh install of BBPress 0.8.3 in a new directory ~/make2for1_com/ for a throwaway domain I had laying around http://make2for1.com/ The database is a freshly created MySQL 4 db. PHP is using version 4.4.7 The .htaccess uses the code generated with http://make2for1.com//bb-admin/rewrite-rules.php and nothing else. The config is the sample file with all the appropriate blanks filled in and nothing more.

    $bb->mod_rewrite = ‘slugs’; is set.

    Trying to get to a profiles produces a 404. Trying to read a discussion produces a 404. If I change $bb->mod_rewrite = false; it works.

    djuggler

    any luck so far?

    I am also with 1and1 hosting.

    mvh: None yet. I’m going to start digging into code and rewrite rules in my spare time. http://make2for1.com/ is about as basic an install of bbpress as can be done. Implementing bbpress shouldn’t be this difficult.

    Obviously mod_rewrite at 1and1 works fine since WordPress pretty permalinks work. I use them at http://realityme.net/ with no problems.

    If I get a solution, I will definitely post it here.

    Could you test your mod_rewrite is really working on http://make2for1.com/

    Please add the following to the top of .htaccess

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule redir youcantfindme
    </IfModule>

    Use browser and navigate to http://make2for1.com/redir

    If you read /youcantfindme was not found, then mod_rewrite does work.

    Performed livibetter’s test. mod_rewrite undeniable works.

    (edit: How did you know it was working? I didn’t notice your 404 doesn’t give the url information. Please use the following code for testing

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule redir youcantfindme [R=301,L]
    </IfModule>

    This time please check the browser’s address, and make sure you read http://make2for1.com/youcantfindme. If you do read that, please continue to the following testing.)

    Please place $bb->debug = 1; to your config.php

    Add exit; right after bb_repermalink(); in forum.php like

    <?php

    require_once('./bb-load.php');

    $forum_id = 0;

    bb_repermalink();
    exit;

    Then navigate to http://make2for1.com/forum.php?id=1 and http://www.make2for1.com/forum/general, once you done, post the result and DO NOT REMOVE this modification (allow us to check it).

    I just ran into this myself… Didn’t think to check here for a workaround. I have bbpress installed as /forum/ and my approach was to add an htaccess with the following:

    RewriteEngine On

    RewriteBase /forum/

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteRule ^([^/]+)/(.*)?$ /forum/$1.php [PT,QSA]

    It seems to be working fine.


    chrishajer
    Participant

    @chrishajer

    Where did you put that .htaccess, in the parent folder or the forum folder?

    livibetter: You are right. I reversed the modifications after testing. They are in place now. A side note, if the directory ‘youcantfindme’ does not exist then http://make2for1.com/redir returns:

    “Error 404 – Not found

    Your browser can’t find the document corresponding to the URL you typed in.”

    And shows http://make2for1.com/youcantfindme in the address field of the browser. If I create the directory ‘youcantfindme’ and put an index file in there then http://make2for1.com/redir does indeed show the index file and the address changes to http://make2for1.com/youcantfindme.

    The debug test shows the following:

    —-

    http://make2for1.com/forum.php?id=1

    REQUEST_URI: string(15) “/forum.php?id=1”

    should be: string(14) “/forum/general”

    full permalink: string(38) “http://www.make2for1.com/forum/general&#8221;

    PATH_INFO: string(10) “/forum.php”


    http://www.make2for1.com/forum/general

    Error 404 – Not found

    Your browser can’t find the document corresponding to the URL you typed in.

    [That was with the RewriteRule redir youcantfindme [R=301,L] .htaccess]


    http://www.make2for1.com/forum/general

    [with the actual .htaccess generated with http://make2for1.com/bb-admin/rewrite-rules.php%5D

    also

    Error 404 – Not found

    Your browser can’t find the document corresponding to the URL you typed in.

    —-

    I have returned the .htaccess back to

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteRule redir youcantfindme [R=301,L]

    </IfModule>

    so you can see the http://make2for1.com/redir work

    If anyone wants to play with this, I’ll happily setup an ftp account. Email juggler@gmail.com

    I have left the changes in place.

    Thanks.

    Doug

    Although “redir” indicated mod_rewrite working. But, that doesn’t seem to be working on “http://www.make2for1.com/forum/general&#8221; testing, or it would output similar result like “http://make2for1.com/forum.php?id=1&#8221; did.

    No idea why “RewriteRule ^forum/([^/]+)/?$ /forum.php?id=$1 [L,QSA]” didn’t match on your forums.

    What was the file path of 404 in web server’s log (using rewrite rules), when accessed “http://www.make2for1.com/forum/general&#8221;?

    any luck so far djuggler?

    i’ve been trying the suggestions but so far, its still the same =(


    jethrokapinksy
    Member

    @jethrokapinksy

    this is what worked for me:

    <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/([^/]+)/([^/]+)/?$ /profile.php?id=$1&tab=$2 [L,QSA]

    RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ /profile.php?id=$1&tab=$2&page=$3 [L,QSA]

    RewriteRule ^profile/([^/]+)/?$ /profile.php?id=$1 [L,QSA]

    RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ /view.php?view=$1&page=$2 [L,QSA]

    RewriteRule ^view/([^/]+)/?$ /view.php?view=$1 [L,QSA]

    RewriteRule ^rss/?$ /rss.php [L,QSA]

    RewriteRule ^rss/forum/([^/]+)/?$ /rss.php?forum=$1 [L,QSA]

    RewriteRule ^rss/topic/([^/]+)/?$ /rss.php?topic=$1 [L,QSA]

    RewriteRule ^rss/tags/([^/]+)/?$ /rss.php?tag=$1 [L,QSA]

    RewriteRule ^rss/profile/([^/]+)/?$ /rss.php?profile=$1 [L,QSA]

    </IfModule>

    hope that helps someone


    jethrokapinksy
    Member

    @jethrokapinksy

    Ok, I just realized that what worked for me only applied to a ‘clean’ top-level install, and what people are having issues with is installing bbpress in example.com/forums/, because example.com’s .htaccess is over-riding example.com/forums/ ‘s .htaccess file.

    So here’s my example.com (permalinks work great):

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule . /index.php [L]

    </IfModule>

    chmod: 644

    And here’s my example.com/forums .htaccess content:

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteBase /forum/

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteRule ^([^/]+)/(.*)?$ /forum/$1.php [PT,QSA]

    </IfModule>

    Any ideas?

    Thanks


    stitchadoodle
    Member

    @stitchadoodle

    **update**: just found https://bbpress.org/documentation/faq/#pretty-permalinks

    after looking for days, don’t know why it took so long to find. this did the trick!


    Also having a problem with pretty permalinks. i am on bluehost with the following:

    wordpress 2.5.1 installed at example.com/blog

    bbpress 0.9.0.2 installed at example.com/bb

    i do have my wp akismet key applied in bbpress, but other than that no wp integration. bbpress works fine until i activate pretty permalinks. at that time, i can see all of my topics & stuff, but i just get 404 when i try to get to them.

    here’s an interesting thing i discovered: both installed to my site via SimpleScripts. WP works fine, but bb appears to have no .htaccess file at all. i do see one in attached to a theme, but that’s it, and apparently not useful there.

    since this seems to be the issue, sort of narrowed down, i created an .htaccess file using the code shown by jethro, but i know there’s something missing. it didn’t break my site, but i couldn’t even get to admin area to see if i could make the permalinks work.

    i’m not a programmer, but if anyone can tell me what code i need to have in the .htaccess file, i can make the file and upload it.

    thanks!

    @ stitchadoodle

    The rules are output to screen when you go to http://example.com/bb/bb-admin/rewrite-rules.php

    Obviously replace example.com with your domain.


    _ck_
    Participant

    @_ck_

    Wait, so was this ever resolved after a year?

    With WordPress in the root and bbPress in a sub-directory (ie. /forums/) can they both have pretty permalinks?

    I have an idea if not – simple edit the webroot wordpress htaccess like so:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} !^/forums/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    where /forums/ is the install path of bbpres underneath wordpress. Remember you still need the local htaccess for bbpress in it’s own folder.

    I just now got this working! The solution is posted at https://bbpress.org/forums/topic/dropping-multiviews-support#post-16050

    Quite simply, turn 1and1 hosting has MultiViews on by default and it must be turned off in .htaccess with:

    Options -MultiViews

    Then add the /bb-admin/rewrite-rules.php mod_rewrite AFTER the Options -MultiViews.

    That was too simple to take this long to resolve.

    i got my pretty permalinks to work fine…. almost

    http://www.djvibe.com/content/forums/

    One little glitch though. I cant access any of my forums directly. It renames all of the forum links to /forum.

    the links look like this:

    ex. http://www.djvibe.com/content/forums/forum/

    which returns an error.

    My htaccess looks like this.

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteBase /content/forums/

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

    RewriteRule ^forum/([^/]+)/?$ /content/forums/forum.php?id=$1 [L,QSA]

    RewriteRule ^topic/([^/]+)/page/([0-9]+)/?$ /content/forums/topic.php?id=$1&page=$2 [L,QSA]

    RewriteRule ^topic/([^/]+)/?$ /content/forums/topic.php?id=$1 [L,QSA]

    RewriteRule ^tags/([^/]+)/page/([0-9]+)/?$ /content/forums/tags.php?tag=$1&page=$2 [L,QSA]

    RewriteRule ^tags/([^/]+)/?$ /content/forums/tags.php?tag=$1 [L,QSA]

    RewriteRule ^tags/?$ /content/forums/tags.php [L,QSA]

    RewriteRule ^profile/([^/]+)/page/([0-9]+)/?$ /content/forums/profile.php?id=$1&page=$2 [L,QSA]

    RewriteRule ^profile/([^/]+)/([^/]+)/?$ /content/forums/profile.php?id=$1&tab=$2 [L,QSA]

    RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ /content/forums/profile.php?id=$1&tab=$2&page=$3 [L,QSA]

    RewriteRule ^profile/([^/]+)/?$ /content/forums/profile.php?id=$1 [L,QSA]

    RewriteRule ^profile/?$ /content/forums/profile.php [L,QSA]

    RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ /content/forums/view.php?view=$1&page=$2 [L,QSA]

    RewriteRule ^view/([^/]+)/?$ /content/forums/view.php?view=$1 [L,QSA]

    RewriteRule ^rss/?$ /content/forums/rss.php [L,QSA]

    RewriteRule ^rss/topics/?$ /content/forums/rss.php?topics=1 [L,QSA]

    RewriteRule ^rss/forum/([^/]+)/?$ /content/forums/rss.php?forum=$1 [L,QSA]

    RewriteRule ^rss/forum/([^/]+)/topics/?$ /content/forums/rss.php?forum=$1&topics=1 [L,QSA]

    RewriteRule ^rss/topic/([^/]+)/?$ /content/forums/rss.php?topic=$1 [L,QSA]

    RewriteRule ^rss/tags/([^/]+)/?$ /content/forums/rss.php?tag=$1 [L,QSA]

    RewriteRule ^rss/profile/([^/]+)/?$ /content/forums/rss.php?profile=$1 [L,QSA]

    RewriteRule ^rss/view/([^/]+)/?$ /content/forums/rss.php?view=$1 [L,QSA]

    </IfModule>

    can’t seem to figure it.. any help would be appreciated.

    graham@djvibe.com

Viewing 25 replies - 26 through 50 (of 51 total)
  • You must be logged in to reply to this topic.
Skip to toolbar