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.

Friendly Urls

13

Comments

  • This doesn't seem to use a 301 redirect for every re-written url,, so I'm scared to use this, for it should cause serious duplicate content issues, cause you'll have two sets of urls that can access the same page. Plus if you put most recent discussions or something out side vanilla on a page, it'll only have the dynamic url displayed, in turn when a search engine goes through this link, it'll pick up duplicate content. Anyone know of a solution?
  • WallPhone, any news on Resilient's /account/username request?
  • I'm working on migrating that hack into a 'real' extension, but I'm in the middle of other projects that have higher priority at the moment.

    It's a little more complicated as an extension because usernames can have characters that aren't allowed in URLs, so that would have to be limited and checked for in existing accounts when enabled.

    ProfileDiscussions just happened to be something I could bang out during a lunch break, so it skipped the line :-)
  • I've tried multiple times to get the friendly URL's to work, but I keep getting the same problem. Vanilla will not allow me to keep a conf/setting.php file as it goes directly into update/install mode at which point it asks me to remove the conf/setting.php file before it can proceed. Any idea as to why Vanilla thinks I am trying to reinstall? I've even changed the settings file to include all of my own installations info - no difference.
  • @waynem80: 301 redirects by definition only apply to "redirects." These are RewriteRules. Nothing is being redirected here. A redirect means that the browser is instructed to physically changes from URL A -> URL B. But a RewriteRule just means that URL A = URL B. Redirects and RewriteRules are two different things. There's no way to create a "301 RewriteRule." It wouldn't make any sense. You would only have to worry about duplicate content if there are links out there in the search engines to your un-friendly URLs.
  • Friendly Urls still needs some work.
    It just isn't as friendly as it should be, IMO.

    The Url structure should be more like a file structure.
    vanilla dir | category | discussion
    so categories would be:
    /vanilla/category-name/
    discussions would be:
    /vanilla/category-name/discussion-name/

    and if you can't do it that way you should at least get rid of all the numbers so discussions would be:
    vanilla/discussion/discussion-name/
    instead of:
    vanilla/discussion/stupid-number/discussion-name/#item_another-stupid-number
    The #item_ thing isnt as big of a deal because i'm guessing its for going to the last comment. but couldnt it say #pgbottom or something instead?
  • The reason you have 'stupid numbers' in the URL is because it's impossible to identify a discussion purely by it's title.
  • That should be fixed then. Cuz that aint friendly to me. :)
  • Using the 'stupid numbers' is actually rather handy when the original poster of a discussion decides to change the title of the discussion one day. Even if the title changes, everyone's bookmarks will still work. Also, you'll notice that Netflix does the exact same thing as Vanilla http://www.netflix.com/Movie/Vanilla_Is_Awesome!!!!!!/70023451 It's the number "70023451" that makes the URL valid, not the name. The only reason why Netflix (and Friendly URLs) adds the text into the URL is to add some extra keywords into search engines. It's those added keywords that makes it "friendly." It's not like Vanilla invented this kind of naming convention. It's pretty widespread.
  • well it still looks ugly but i guess that makes sense. what about showing the category name in urls?

    Edit: I dunno.. I guess I'm just used to wordpress. You just tell it what url structure you want and it spits out a .htaccess file for you and you dont need any ID's if you dont want them. Oh well, I love vanilla anyway :)
  • It cant be 'fixed' because as dan39 says the discussion title my change and also on a reasonably size forum there are bound to be multiple discussions with the same name. The forum would never know which one to pick. I guess it could be done for categories with a bit of extra code in the core as they're unlikely to have the same name.
  • You don't need the IDs in a blog as you're highly unlikely to change the name of a post and your much more likely to spend longer mulling over what to call it in the first place. That and the chances of a duplicate are also far lower as there are generally fewer posts in a blog than a forum.
  • -nevermind, sorry!-
  • Using the id + the title for the link is not perfect since it create duplicate pages. e.g.: http://lussumo.com/community/discussion/5425/2/friendly-urls/ == http://lussumo.com/community/discussion/5425/2/foo/ http://lussumo.com/community/discussion/5425/2/friendly-urls/ == http://lussumo.com/community/discussion/5425/2/ it could be fix by redirecting http://lussumo.com/community/discussion/5425/2/.*/ to http://lussumo.com/community/discussion/5425/2/. But It would slow the load of the page. Using the title is not possible but a meaningful unique key could be created from the title. The key for a post called "test" would be something like test-999 and could be reached by http://lussumo.com/community/discussion/test-999/.
  • DinoboffUsing the title is not possible but a meaningful unique key could be created from the title. The key for a post called "test" would be something like test-999 and could be reached by http://lussumo.com/community/discussion/test-999/.
    i like that idea
  • But then you lose the SEO-friendly keywords in the URL, which is really the whole point of this Add-On. All you would gain is the elimination of the remote possibility that someone creates duplicate URLs. (And what if someone edits the Title of the post? Would that change the key in the URL?)
  • I don't know why it would not be seo-friendly. the key word is here.
    The link for this page would be http://lussumo.com/community/discussion/friendly-urls-29/2/.
    It is search engine friendly since there is no query string; and it is meaningful for search engines and the user who bookmark it. The 29 is here because there must be 29 discussion with the same title.

    would it be better like http://lussumo.com/community/discussion/friendly-urls/n29/2/

    If the user change the title, the key or the url should not change.
  • Surely having to use 29 is just like having to use 5425 though?
  • yes, you're right, it will be easier to create the key from the original title + primary key if the title has been already used.

    Anyway the point is that we can create a meaningful unique key (as meaningful as the original title) for each discussion, retrieve the discussion with something else than the primary key, and get one unique url for each discussion.

    Someone wants to create the patch for that?
    It involves some changes in the way the discussion are created, updated, ins the way the discussion grid is created, and in the installer. It would also need and upgrader 1.1.x => 1.2.
  • Personally, I think it's fine the way it is right now. But, that's just me.
Sign In or Register to comment.