Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbPress URL Rewrite shenanigans


  • Jake Hall
    Participant

    @geekserve

    Good Morning all,

    This is an issue I have had present on my bbPress forum ever since I moved away from Apache, and onto lighttpd. The difference is, I have to add the rules manually to get them to work. Anyway, here is what I currently have in my .htaccess equivalent:

    # This is mainly a fix for bbPress and its functions
    url.rewrite = (
        "^//(wp-admin|wp-includes|wp-content|gallery2)/(.*)" => "$0",
        "^//(.*)\.(.+)$" => "$0",
        "^//(.+)/?$" => "/index.php/$1"
      )
    }

    Unfortunately, whenever I try to perform an action on a post (e.g anything that utilises the “?action” URL argument), it redirects back to the post. E.g:

    http://rockstarwire.net/community/thread/yrs/edit/?action=merge – Will navigate to the edit post page.
    http://rockstarwire.net/community/thread/bbcodes-have-been-temporarily-disabled/?action=bbp_toggle_topic_close&topic_id=983 – Will navigate to the post again. (and won’t close the topic)

    Now I am pretty sure this is going to be something to do with the URL redirects, infact, I am almost positive that will be the case.

    Could anyone assist with this one?

    Thanks

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

  • Robkk
    Moderator

    @robkk

    I could really only find posts that were talking about bbPress v1 standalone. I did find a post that was in 2012, which I think the bbPress plugin was around then. You can study the code and see if it would work.

    The page is in another language though.

    Pretty permalinks en WordPress con Lighttpd


    Jake Hall
    Participant

    @geekserve

    As I expected, was something to do with the rewrite rules. Was a very simple fix, I simply started messing with the rewrite until it worked. This is how mine works flawlessly should anyone have the same issur and somehow stumble across this thread.

    Note: This is for lighttpd. This is not an Apache or Nginx solution.

    # This is mainly a fix for bbPress and its functions
    url.rewrite = (
        "^/(wp-admin|wp-includes|wp-content|gallery2)/(.*)" => "$0",
        "^/(.*)\.(.+)$" => "$0",
        "^/(.+)/?$" => "/index.php/$1"
      )
    }

    All I did here was remove the additional forward slash within each rule.

    Now my links work perfectly!


    Robkk
    Moderator

    @robkk

    Glad you got it to work. 🙂

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