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
2 questions
1. Is it possible to change the directory structure seen in the urls?
/vanilla/discussions/ --> to --> /vanilla/topics/
/vanilla/discussion/ --> to --> /vanilla/topic/
2. How can I remove the title from the url. The current way can cause duplicate content issues.
/community/discussion/1/my-title-here/#Item_1
to
/community/discussion/1/#Item_1
0
This discussion has been closed.
Comments
RewriteRule ^discussions/$ index.php [QSA,L]
RewriteRule ^discussions/([0-9]+)/$ index.php?page=$1 [QSA,L]
to
RewriteRule ^topics/$ index.php [QSA,L]
RewriteRule ^topics/([0-9]+)/$ index.php?page=$1 [QSA,L]
and then add the following line to your conf/settings.php file (between the <? and ?> tags)
$Configuration['REWRITE_index.php'] = 'topics/';
It should take care of your first request (no guarantees though!). Unfortunately i dont have time to look into your second but i shouldnt be too difficult. I'll be back if noone else is.
// Url Rewriting Definitions $Configuration['REWRITE_categories.php'] = 'categories/'; $Configuration['REWRITE_index.php'] = 'discussions/'; $Configuration['REWRITE_comments.php'] = 'discussion/'; $Configuration['REWRITE_search.php'] = 'search/'; $Configuration['REWRITE_account.php'] = 'account/'; $Configuration['REWRITE_settings.php'] = 'settings/'; $Configuration['REWRITE_post.php'] = 'post/'; $Configuration['REWRITE_people.php'] = 'people/'; $Configuration['REWRITE_extension.php'] = 'extension/';
and obviously change them as needed.
if ($Configuration['URL_BUILDING_METHOD'] == 'mod_rewrite') $Suffix = CleanupString($Discussion->Name).'/';
out of the 2 vanilla functions you mentioned would probably do the trick.
I'm pretty sure there is a way to override both these functions - that's the basis of object orientated programming I think? I dunno how it's done though.