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 Engine Frienly URL's?

2

Comments

  • Considering what we went through to convince mark to accept donations it seems unlikely he's going to start charging for this particular piece of software.
  • MarkMark Vanilla Staff
    Yes, it will still be free :) I have a bunch of other pieces of software that will also be free in the works. Eventually I'll be releasing some services that you will have to pay for to use (if you want to). I'm hoping that all of the traffic I'm getting from my free software will flow over into the pay-services so I can quit working for other people and do the services / open-source stuff full time.
  • MarkMark Vanilla Staff
    I'm finally working on this, and after 6 hours of trying to get mod_rewrite to work, I've decided that it is beyond me. I simply cannot get it to work.
  • WHat are you stuck with?
  • MarkMark Vanilla Staff
    edited November 2005
    It doesn't work.

    mod_rewrite is installed and configured, but it doesn't direct to any pages. No matter what I try, I get every variety of generic server error that explains nothing.

    I've got apache set up with a virtual host like so:
    Listen 8020
    <VirtualHost localhost:8020>
        Alias /people/library C:\applications\lussumo\GlobalLibrary
        Alias /swell/library C:\applications\lussumo\GlobalLibrary
        Alias /people/themes C:\applications\lussumo\vanilla\themes
        Alias /swell/themes C:\applications\lussumo\vanilla\themes
        Alias /people/js C:\applications\lussumo\GlobalJs
        Alias /swell/js C:\applications\lussumo\GlobalJs
        Alias /vanilla/js C:\applications\lussumo\GlobalJs
        DocumentRoot C:\applications\lussumo
        ServerName localhost:8020
      
        <Directory C:\applications\lussumo>
                AllowOverride All
                Options +Indexes
        </Directory>
        php_value include_path .
        php_flag asp_tags off
        php_flag magic_quotes_gpc off
        php_flag register_globals off
        php_flag expose_php off
        php_flag register_argc_argv off
        php_value session.save_path c:/temp/
        DirectoryIndex index.html index.php default.php
    
        #Rewrite Rules
        RewriteEngine on
        Options +FollowSymlinks
        # RewriteBase /vanilla/
        RewriteRule ^discussion/([0-9]+)/?$ comments.php?DiscussionID=$1 [L]
        RewriteRule ^discussion/([0-9]+)/([0-9]+)/?$ comments.php?DiscussionID=$1&page=$2 [L]
    </VirtualHost> 
    Vanilla sits in a "vanilla" subdirectory off c:\applications\lussumo. I've tried a ton of different variations on the rewrite rules - I originally thought it might be a path problem. This is just the latest set of simple rules I've been trying.

    I've been trying to load the following url without any success:

    http://localhost:8020/vanilla/discussion/1083

    No luck.
  • MarkMark Vanilla Staff
    Oh, and if I uncomment this:

    # RewriteBase /vanilla/

    Apache won't start when I try to restart it. It just stops and then throws an error.
  • Have you tried it in a live enviroment rather than just on your localhost?
  • NickENickE New
    edited November 2005
    Try RewriteBase /vanilla, without the extra slash. I'd stick it in an .htaccess file within the vanilla directory, though, so you can lose the RewriteBase and also distribute it with future versions of Vanilla.

    For instance, the following in an .htaccess file within the Vanilla root directory worked for me:
    <IfModule mod_rewrite.c>
    	RewriteEngine on
    	
    	RewriteRule ^c_([0-9]+)-([0-9]+).html$ comments.php?DiscussionID=$1&page=$2 [QSA]
    	RewriteRule ^c_([0-9]+).html$ comments.php?DiscussionID=$1 [QSA]
    	RewriteRule ^d_([0-9]+).html$ index.php?page=$1 [QSA]
    </IfModule>
    Which would be accessed like /vanilla/c_5.html, or /vanilla/d_1.html.
  • MarkMark Vanilla Staff
    edited November 2005
    Chris - no, I haven't. I'd really like it to work in both environments, so I'm just focusing on the local right now. Sirnot - I'll give that a shot. And I think the .htaccess file is the way to go, as well. I've just gotten used to mucking about with my httpd.conf. While we're on the subject, one of the difficult things I'm trying to deal with is how to handle all of the potential url parameters that could come about while using Vanilla. There are, to name a few: * PostBackAction (when performing various actions throughout the site) * Page (for going through different pages of discussions or comments) * DiscussionID (when looking at a discussion) * CommentID (when editing a comment) * Highlight (for search terms) I'm trying to work on a url builder that can be told "use mod_rewrite" or "don't use mod_rewrite" and work either way. The biggest difficulty I'm finding is that I just don't know the best way to reference this information in the url. I'm so used to the name/value pairs that dropping the name just doesn't make sense to me. Example: I'm thinking of doing something like this for a page of comments: vanilla.com/discussion/1083/5 Where 1083 is the discussionid and 5 is the page. Does that make sense? Should I be handling paging in some other way? I just want some consistency with this, and it's new to me so I don't know any best practices.
  • Are you also putting the title in the URL too?

    I think vanilla.com/discussion/1083/5/vanilla-is-cool/ would work best as you get the numbers out the way first, mostly people will see the visual style of "vanilla-is-cool" which I think most people would like.
  • MarkMark Vanilla Staff
    Hahaha - well, I'm just trying to get the flippin thing to work right now. Either way, while I appreciate that people like to see the text in the url, I don't see it as a necessary thing, so I will probably make the mod_rewrite work for either vanilla.com/discussion/1083/5 OR vanilla.com/discussion/1083/5/vanilla-is-cool/ ... meaning that the text is just there for a visual reminder about what the thread might be about, but is completely ignored by mod_rewrite
  • edited November 2005
    would vanilla.com/discussion/1083/5/vanilla-sucks/ also point to the same thread? (Example used for purpose of illustration only)
  • MarkMark Vanilla Staff
    yes
  • Here I am bumping this post but I'm interested in this subject. Its been so long since the last post... Is Mark (or someone) still working on this?
  • Look up at the address bar :)
  • MarkMark Vanilla Staff
    Yeah - it's been done for 0.9.3
  • How dumb of me, I look at the address of my vanilla installation and didn't even check this one. I downloaded vanilla a few days ago, shouldn't my version have that too? or I need to enable it? If so how do I do it?
  • MarkMark Vanilla Staff
    0.9.3 is not ready for release yet. There are a few minor bugs in it, and I'm waiting on some of the members who are rewriting the xhtml and css. Once that is done, I will release it as version 1 and there will be both a new installation script, and a new upgrade script that will help with upgrading from 0.9.2.
  • oh great, I wish I could help but with my current knowledge I'd probably just get in the way. I'll start by creating some extentions in my very very reduced free time. Congrats for Vanilla. Are there any predictions on when it will be released?
  • If he gave you one, believe me it wouldnt be accurate ;). Just sit tight and wait.
Sign In or Register to comment.