Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Search and Registration doesnt work

edited July 2006 in Vanilla 1.0 Help
i have a new vanilla install over at http://board.subcultures.at but somehow the forum search and the user registration does not work. i remember there were problems with mod_secure because of "tback" in some urls of the forum with "PostBackAction" in them when i was using the forum back then. it seems like every url that has "PostBackAction" in it just shows the /discussions page. im going to check back with my webhost if they could let requests with "tback" in them through for me. still i wanted to ask if you are aware of that and if it would be possible to rename "PostBackAction" to something different in a future release. cheers

Comments

  • MarkMark Vanilla Staff
    edited July 2006
    I've never heard of anything like that before. It seems kind of ridiculous that "tback" would cause a security problem. More likely your mod_rewrite isn't working properly or set up properly. Try disabling mod_rewrite in Vanilla to see what happens.
  • with mod_rewrite disabled everything works. sorry for the confusion. i am using lighttpd with the rewrite rules from http://lussumo.com/addons/?PostBackAction=AddOn&AddOnID=98 im not sure whats wrong with them or if there is even something wrong with them. i just assumed there is a problem with mod_secure because the only pages that were not working contained the "tback" string in the URI because of "PostBackAction" in the URI and that caused problems in the past. see: http://forum.textdrive.com/viewtopic.php?id=4659
  • MarkMark Vanilla Staff
    I think the problem is that the postbackaction isn't being passed through with those mod_rewrite rules. But I could be mistaken.

    I'm really not that great with rewrite rules at all. Maybe we can get defel (the author of those rules) in here to help out?
  • is there a way to contact defel? i didnt find a way through his profile. and it seems like the addon section also has no way to contact an author. i set the forum back to the ugly default URIs in the meantime :) at least it works perfectly this way..thats the most important thing...clean URIs would just be slightly more ideal
  • MarkMark Vanilla Staff
    I've just emailed him about it. Hopefully he drops by to check it out...
  • thanks a lot
  • edited July 2006
    Hi,

    you must do 2 small changes i didnt commented.

    First, disable rewrite for some files in appg/settings.php. Like so:
    // Url Rewriting Definitions
    $Configuration['REWRITE_categories.php'] = 'categories/';
    $Configuration['REWRITE_index.php'] = 'discussions/';
    $Configuration['REWRITE_comments.php'] = 'discussion/';
    $Configuration['REWRITE_search.php'] = 'search.php';
    $Configuration['REWRITE_account.php'] = 'account/';
    $Configuration['REWRITE_settings.php'] = 'settings/';
    $Configuration['REWRITE_post.php'] = 'post/';
    $Configuration['REWRITE_people.php'] = 'people.php';

    I think thats ok for user, admins and search-engines.

    And here is my complete Rewrite-Rule, dont have problems with it since change-over to Lighttpd:

    url.rewrite-once = ( "^/discussions/?$" => "index.php",
    "^/discussions/([0-9]+)/?$" => "index.php?page=$1",
    "^/([0-9]+)/?$" => "index.php?CategoryID=$1",
    "^/([0-9]+)/([0-9]+)/?$" => "index.php?CategoryID=$1&page=$2",
    "^/discussion/([0-9]+)/([0-9]+)/(.*)/?$" => "comments.php?DiscussionID=$1&page=$2",
    "^/discussion/([0-9]+)/(.*)/?$" => "comments.php?DiscussionID=$1",
    "^/discussion/([0-9]+)/([0-9]+)/?$" => "comments.php?DiscussionID=$1&page=$2",
    "^/discussion/([0-9]+)/?$" => "comments.php?DiscussionID=$1",
    "^/categories/?$" => "categories.php",
    "^/account/?$" => "account.php",
    "^/account/([0-9]+)/?$" => "account.php?u=$1",
    "^/account/([0-9]+)/\?(.*)$" => "account.php?u=$1&$2",
    "^/account/(.*)$" => "account.php$1",
    "^/search/?$" => "search.php",
    "^/search/([0-9]+)/?$" => "search.php?page=$1",
    "^/search/saved/([0-9]+)/?$" => "search.php?SearchID=$1",
    "^/search/saved/([0-9]+)/([0-9]+)/?$" => "search.php?SearchID=$1&page=$2",
    "^/post/?$" => "post.php",
    "^/post/([0-9]+)/?$" => "post.php?CommentID=$1",
    "^/post/category/([0-9]+)/?$" => "post.php?CategoryID=$1",
    "^/settings/(.*)$" => "settings.php$1",
    "^/people/$" => "people.php",
    "^/(discussions|categories|search|post|settings|people|[0-9]+)/(extensions|themes|images|ajax)/(.*)" => "$2/$3",
    "^/(discussions|categories|search|post|settings|people|[0-9]+)/(account.php|categories.php|comments.php|extension.php|index.php|people.php|post.php|search.php|settings.php)" => "$2",
    "^/discussion/([0-9]+/){1,2}[^/]*/(extensions|themes|images|ajax)/(.*)" => "$2/$3",
    "^/discussion/([0-9]+/){1,2}[^/]*/(account.php|categories.php|comments.php|extension.php|index.php|people.php|post.php|search.php|settings.php)" => "$2", "^/(discussions|account|search|post|[0-9]+)/.+/(extensions|themes|images|ajax)/(.*)" => "$2/$3",
    "^/(discussions|account|search|post|[0-9]+)/.+/(account.php|categories.php|comments.php|extension.php|index.php|people.php|post.php|search.php|settings.php)" => "$2"
    )
    Look at the line '"^/account/(.*)$" => "account.php$1"', this rewrite-rule is for urls like '/account/?PostBackAction=foobar .. you can add this for all files and then active rewrite-definitions for this files as described at the beginning.

    Is there a way to update the extension?
  • you can go to your addon page and then click on "Upload New Source File" that should do it :) im going to try your recommendations now
  • thank you. works great
This discussion has been closed.