Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Pretty URLs
GreenGiant
New
I have a category which when visited uses the following URL structure:
/category-name
but when I view a post inside that category the URL is:
/discussion/224/post-name
I would have expected it to be:
/category-name/224/post-name
Tagged:
0
Comments
Welcome to the community!
You didn't really ask a question, but that is how Vanilla is organized.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Sorry! Yer I guess my question originally was if that was default behaviour or if there was a setting I missed to set pretty URLs ala Wordpress admin.
If not any decent plugins to do so?
I don't know of any.
Yes, the URL structure is different from wordpress, but I'd argue, that the URLs are already pretty the way they are. (Assuming you have the
$Configuration['Garden']['RewriteUrls']
set to true)Forum content is dynamic. With your proposed URL structure, moving a discussion to a different category would break its URL and renaming a category would break the URLs of all discussions of that category.
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
Renaming a discussion doesn't break the URL, so I don't see why moving a discussion or renaming the category would. The slugs do not affect what discussion is loaded.
But yeah, Vanilla just doesn't do it that way at the moment.
@JasonBarnabe you're right. @GreenGiant suggested one where the ID ist still in the URL.
I guess it could be done as a plugin by overriding DiscussionUrl() and using the 404 handler. One would have to make sure it doesn't clash with controller names, though.
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
I dont see that in the config file. Am I missing something? Or maybe need new glasses? Found all the $Configuration['Garden'] code, but not ['RewriteUrls']
Oops, I think I'm commenting in the wrong place. I have v2.2.1
Snooty, please take a look at this https://vanillaforums.org/discussion/comment/220157/#Comment_220157
you can always add statements to config.php if you don't see the part on the left hand side of the = in your config.php or modify the part on the right side of the =
you might want to skim through all the questions if you are new to this game:
https://vanillaforums.org/discussion/28420/frequently-asked-questions
as well as here:
http://docs.vanillaforums.com
Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.
Thanks much River, will do.
Thanks for the help River. Created: $Configuration['Garden']['RewriteUrls'] and set it to true, URL's are "pretty" now. Although I prefer to call them "SEO friendly" or "human friendly".