Skip to:
Content
Pages
Categories
Search
Top
Bottom

[resolved] link parsing from “nice links” to mysql database produces 404 errors


  • azteca1001
    Participant

    @azteca1001

    hi guys!
    first of all, this is my very first installation, and i have really not very much experience with content managment systems in general, so be soft on me please.

    second, everything actually seems to work, except for the fact, that apache2 returns an error 404 for each and every single page, that i would like to open from bbpress.

    i created some forums, and posted a test post in there.

    that content i found in the mysql database in the wp_posts table, so the communication to the mysql database basically works.

    but from the looks of it, when you try to call that contnet, apache seems to be looking in the actual filestructure for those files/that content, rather than within the mysql database.

    the very only hint that i could find on the net, was that something with my htaccess file could be wrong.
    so as regular expressions make basically not much sense do decifer, when you haven’t the single first clue, what is supposed to go through them, i cannot tell, whether what i i found in these files is correct, here is, what /etc/pordpress/htaccess contains:

    
    # For rewrite rules needed for making WordPress URL friendly
    # See Options -> Permalinks for details and please use the defaults,
    # especially in mind when hosting several blogs on one machine!
    
    ##
    ## Configuration for a single blog hosted on / (root of the website)
    ##
    #<IfModule mod_rewrite.c>
    #RewriteEngine On
    #RewriteBase /
    #RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteRule . /index.php [L]
    #</IfModule>
    
    ##
    ## Configuration for a multi-site wordpress installation using subdomains
    ##
    #<IfModule mod_rewrite.c>
    #RewriteEngine On
    #RewriteBase /
    #RewriteRule ^index\.php$ - [L]
    ## uploaded files
    #RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    ## real files dealt directly
    #RewriteCond %{REQUEST_FILENAME} -f [OR]
    #RewriteCond %{REQUEST_FILENAME} -d
    #RewriteRule ^ - [L]
    ## other go through index.php
    #RewriteRule . index.php [L]
    #</IfModule>
    

    /usr/share/wordpress/.htaccess
    contains exactly the same,

    /var/www/wordpress/.htaccess
    contains:

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

    /var/www/wordpress/wp-content/plugins/buddypress/bp-forums/bbpress/bb-admin/includes/defaults.bb-htaccess.php
    contains this:

    
    <?php
    
    $_rules = <<<EOF
    # BEGIN bbPress
    
    Options -MultiViews
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase %PATH%
    
    RewriteRule ^page/([0-9]+)/?$ %PATH%index.php?page=$1 [L,QSA]
    RewriteRule ^forum/([^/]+)/page/([0-9]+)/?$ %PATH%forum.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^forum/([^/]+)/?$ %PATH%forum.php?id=$1 [L,QSA]
    RewriteRule ^forum/?$ %PATH% [R=302,L,QSA]
    RewriteRule ^topic/([^/]+)/page/([0-9]+)/?$ %PATH%topic.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^topic/([^/]+)/?$ %PATH%topic.php?id=$1 [L,QSA]
    RewriteRule ^topic/?$ %PATH% [R=302,L,QSA]
    RewriteRule ^tags/([^/]+)/page/([0-9]+)/?$ %PATH%tags.php?tag=$1&page=$2 [L,QSA]
    RewriteRule ^tags/([^/]+)/?$ %PATH%tags.php?tag=$1 [L,QSA]
    RewriteRule ^tags/?$ %PATH%tags.php [L,QSA]
    RewriteRule ^profile/([^/]+)/page/([0-9]+)/?$ %PATH%profile.php?id=$1&page=$2 [L,QSA]
    RewriteRule ^profile/([^/]+)/([^/]+)/?$ %PATH%profile.php?id=$1&tab=$2 [L,QSA]
    RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ %PATH%profile.php?id=$1&tab=$2&page=$3 [L,QSA]
    RewriteRule ^profile/([^/]+)/?$ %PATH%profile.php?id=$1 [L,QSA]
    RewriteRule ^profile/?$ %PATH%profile.php [L,QSA]
    RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ %PATH%view.php?view=$1&page=$2 [L,QSA]
    RewriteRule ^view/([^/]+)/?$ %PATH%view.php?view=$1 [L,QSA]
    RewriteRule ^rss/?$ %PATH%rss.php [L,QSA]
    RewriteRule ^rss/topics/?$ %PATH%rss.php?topics=1 [L,QSA]
    RewriteRule ^rss/forum/([^/]+)/?$ %PATH%rss.php?forum=$1 [L,QSA]
    RewriteRule ^rss/forum/([^/]+)/topics/?$ %PATH%rss.php?forum=$1&topics=1 [L,QSA]
    RewriteRule ^rss/topic/([^/]+)/?$ %PATH%rss.php?topic=$1 [L,QSA]
    RewriteRule ^rss/tags/([^/]+)/?$ %PATH%rss.php?tag=$1 [L,QSA]
    RewriteRule ^rss/tags/([^/]+)/topics/?$ %PATH%rss.php?tag=$1&topics=1 [L,QSA]
    RewriteRule ^rss/profile/([^/]+)/?$ %PATH%rss.php?profile=$1 [L,QSA]
    RewriteRule ^rss/view/([^/]+)/?$ %PATH%rss.php?view=$1 [L,QSA]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^.*$ %PATH%index.php [L]
    </IfModule>
    
    # END bbPress
    EOF;
    
    $_rules = str_replace( '%PATH%', bb_get_option( 'path' ), $_rules );
    

    if i set the permalinks from “nice links” to php=dafb51fd1? , then i get

    Oops! That page can’t be found.

    any ideas, please?

    thanks in advance and yours, azteca.

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

  • Robkk
    Moderator

    @robkk

    What version of bbPress are you using?? Is it the bbPress forum module in an old version of BuddyPress??


    azteca1001
    Participant

    @azteca1001

    Hey Robkk!

    First of all, thanks for noticing, and nope it is the latest, says 2.5.8.

    Oh and by the way, i completely purged all of apache, including all of the files in /var/www, and started over.
    now at least the ugly links work, but the pretty ones still don’t.

    ok, and then i put all into the /var/www/ folder directly this time, as the install instructions for buddy press state, that wordpress must under no circumstances be in any subfolder.

    i have installed no buddy press so far but only bbpress, that is alongside multilingual the only plugin so far.
    but i am actually planning on installing quite a number, i found at least 24242 so far πŸ˜€

    now the ugly links are really ugly…
    i’d like people to be able to see the topic/content from a link in a mail… πŸ™‚

    can i have it like that? πŸ˜€


    azteca1001
    Participant

    @azteca1001

    what adds a lil to the annoyment, is the fact, that bbpress ONLY works with ugly links, and buddy press works with everything BUT ugly links.
    UUUFFF.


    Robkk
    Moderator

    @robkk

    Its weird that you are getting this, bbPress and BuddyPress should work fine in most permalink structures (not all), but usually pretty permalinks and the default permalinks structure should work fine.

    You did not try to edit any of the core plugins to try to fix it right??
    Also you didn’t try to modify the htaccess file in WordPress unless you knew what you were doing??
    Do you have a multisite installation??

    I am making sure this isn’t a user created issue.


    azteca1001
    Participant

    @azteca1001

    ok, here is how i fixed it:
    i added
    <Directory “/var/www/”>
    AllowOverride All
    </Directory>

    into /etc/apache2/sites-avaliable/000-default
    into the virtual host section.

    works fine now. πŸ™‚

    thanks for your help, bro!

    so how to i set the thread to “solved”?


    Robkk
    Moderator

    @robkk

    Glad you fixed your issue. πŸ™‚

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[resolved] link parsing from “nice links” to mysql database produces 404 errors’ is closed to new replies.
Skip to toolbar