This should be possible via the .htaccess URL rewriting. I'm not sure how otherwise, since the URL being passed to Vanilla has to have a certain format so that it knows it has to call the DiscussionController...
RewriteRule /discussion/(*) /whatever/$1 [R=301] RewriteRule /whatever/(*) /discussion/$1 [PT, L] See next post
^ My 10-second incomplete sketch of what the solution probably entails if it can be done at all (sorry, writing plugins at the moment). Don't paste that onto your live site :P
Thank you guys. Lincoln, that's even better with .htaccess :) but your Rules gives me the Internal Server Error. I'm with godaddy, the inconvenient, heh Do I have another chance ?
Rules were way wrong, haha. OK, after this line: RewriteEngine On Do this: RewriteRule ^discussion/(.*)$ /whatever/$1 [R,L] RewriteRule ^whatever(.*) index.php\?p=discussion$1 [PT,L] But substitute your new word in where I typed whatever.
Note that this is a VERY SPECIFIC solution that only fixes the URL to individual discussions, not a comprehensive fix for language substitution. Also, this obviously only works when "pretty" URLs are enabled.
@Lincoln I tried your rules above and though the URLs are changing when I click on a discussion it just disappears instead of taking me to comments' page.
Rules were way wrong, haha. OK, after this line: RewriteEngine On Do this: RewriteRule ^discussion/(.*)$ /whatever/$1 [R,L] RewriteRule ^whatever(.*) index.php\?p=discussion$1 [PT,L] But substitute your new word in where I typed whatever.
Note that this is a VERY SPECIFIC solution that only fixes the URL to individual discussions, not a comprehensive fix for language substitution. Also, this obviously only works when "pretty" URLs are enabled.
@Lincoln i tried it and it works perfect. but is it possible to modify this code for url structure like mydomain.com/whatever
You want to omit the discussion ID# as well? Doing that is a bit beyond what I'm willing to type out, because you're absolutely going to run into all sorts of conflicts with every other URL on your site.
If you just want mydomain.com/123/discussion-name then you could do it by writing all URLs that start with a number to the discussions controller. I don't favor this change though because you're liable to run into conflicts between other Vanilla apps and future changes.
Has there been any progress on this? Though the .htaccess is a step in the right direction it doesn't solve the problem. We need something that would change the saving and output of the urls entierly.
Comments
Developer at Vanilla Forums, Inc. [GitHub, Twitter]
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •RewriteRule /discussion/(*) /whatever/$1 [R=301]
RewriteRule /whatever/(*) /discussion/$1 [PT, L] See next post
^ My 10-second incomplete sketch of what the solution probably entails if it can be done at all (sorry, writing plugins at the moment). Don't paste that onto your live site :P
Developer at Vanilla Forums, Inc. [GitHub, Twitter]
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Lincoln, that's even better with .htaccess :) but your Rules gives me the Internal Server Error.
I'm with godaddy, the inconvenient, heh
Do I have another chance ?
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •RewriteEngine OnDo this:
RewriteRule ^discussion/(.*)$ /whatever/$1 [R,L]RewriteRule ^whatever(.*) index.php\?p=discussion$1 [PT,L]
But substitute your new word in where I typed whatever.
Note that this is a VERY SPECIFIC solution that only fixes the URL to individual discussions, not a comprehensive fix for language substitution. Also, this obviously only works when "pretty" URLs are enabled.
Developer at Vanilla Forums, Inc. [GitHub, Twitter]
- Spam
- Abuse
- Troll
2 • Off Topic Insightful Awesome LOL •I tried your rules above and though the URLs are changing when I click on a discussion it just disappears instead of taking me to comments' page.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •thanks
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Developer at Vanilla Forums, Inc. [GitHub, Twitter]
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •e.g. http://vanillaforums.org/change-discussions-url-name#Item_9
is it possible with .htaccess editing ?
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •If you just want mydomain.com/123/discussion-name then you could do it by writing all URLs that start with a number to the discussions controller. I don't favor this change though because you're liable to run into conflicts between other Vanilla apps and future changes.
Developer at Vanilla Forums, Inc. [GitHub, Twitter]
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Has there been any progress on this? Though the .htaccess is a step in the right direction it doesn't solve the problem. We need something that would change the saving and output of the urls entierly.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •We've made it easier to do this in the upcoming 2.1, but you'll still have to write a plugin.
- Spam
- Abuse
- Troll
1 • Off Topic 1Insightful Awesome LOL •