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.
Mod-Rewrite help...
Now I've been sitting infront of my comp for hours trying to figure out how to do these and I can't for the life of me figure it out.
I want to change
http://forumurl/discussion/#/name/#Item_1 to:
http://forumurl/threads/#/name/#Item_1
Simply global replacing all instances of discussion with threads doesn't work.
Also I want to change http://forumurl/CategoryID to:
http://forumurl/CategoryName
0
This discussion has been closed.
Comments
$Configuration['REWRITE_comments.php'] = 'discussion/';
into your conf/settings.php file, and change discussion to threads, then change any references in your .htaccess file (i assume you've done that). I think that should do the trick...
Make sure if you do a find&replace on your htaccess file that you dont replace any of the discussions section...
Also I have the following code in the htaccess file so I can replace /?View=ParticipatedThreads and etc with my own dir structure but it's not working.
RewriteRule ^participated/$ index.php?View=ParticipatedThreads [QSA,L] RewriteRule ^favorite/$ index.php?View=Bookmarks [QSA,L] RewriteRule ^private/$ index.php?View=Private [QSA,L]
Do I have to do the same thing I did with discussion -> thread?
Any ideas?
RewriteEngine On RewriteBase / #Options +FollowSymLinks -Multiviews #Discussions RewriteRule ^discussions$ index.php [QSA,L] RewriteRule ^discussions/$ index.php [QSA,L] RewriteRule ^discussions/([0-9]+)$ index.php?page=$1 [QSA,L] RewriteRule ^discussions/([0-9]+)/$ index.php?page=$1 [QSA,L] RewriteRule ^([0-9]+)$ index.php?CategoryID=$1 [QSA,L] RewriteRule ^([0-9]+)/$ index.php?CategoryID=$1 [QSA,L] RewriteRule ^([0-9]+)/([0-9]+)$ index.php?CategoryID=$1&page=$2 [QSA,L] RewriteRule ^([0-9]+)/([0-9]+)/$ index.php?CategoryID=$1&page=$2 [QSA,L] #Comments RewriteRule ^discussion/([0-9]+/){1,2}[^/]*/(extensions|themes|images|ajax|js)/(.*) $2/$3 [QSA,L] RewriteRule ^discussion/([0-9]+/){1,2}[^/]*/(account.php|categories.php|comments.php|extension.php|index.php|people.php|post.php|search.php|settings.php|termsofservice.php) $2 [QSA,L] RewriteRule ^discussion/([0-9]+)/([0-9]+)/(.+)$ comments.php?DiscussionID=$1&page=$2 [QSA,L] RewriteRule ^discussion/([0-9]+)/([0-9]+)/(.+)/$ comments.php?DiscussionID=$1&page=$2 [QSA,L] RewriteRule ^discussion/([0-9]+)/(.*)$ comments.php?DiscussionID=$1 [QSA,L] RewriteRule ^discussion/([0-9]+)/(.*)/$ comments.php?DiscussionID=$1 [QSA,L] RewriteRule ^discussion/([0-9]+)/([0-9]+)$ comments.php?DiscussionID=$1&page=$2 [QSA,L] RewriteRule ^discussion/([0-9]+)/([0-9]+)/$ comments.php?DiscussionID=$1&page=$2 [QSA,L] RewriteRule ^discussion/([0-9]+)$ comments.php?DiscussionID=$1 [QSA,L] RewriteRule ^discussion/([0-9]+)/$ comments.php?DiscussionID=$1 [QSA,L] #Categories RewriteRule ^categories/$ categories.php [QSA,L] #Account RewriteRule ^account/$ account.php [QSA,L] RewriteRule ^account/([0-9]+)$ account.php?u=$1 [QSA,L] RewriteRule ^account/([0-9]+)/$ account.php?u=$1 [QSA,L] #Search RewriteRule ^search/$ search.php [QSA,L] RewriteRule ^search/([0-9]+)$ search.php?page=$1 [QSA,L] RewriteRule ^search/([0-9]+)/$ search.php?page=$1 [QSA,L] RewriteRule ^search/saved/([0-9]+)$ search.php?SearchID=$1 [QSA,L] RewriteRule ^search/saved/([0-9]+)/$ search.php?SearchID=$1 [QSA,L] RewriteRule ^search/saved/([0-9]+)/([0-9]+)$ search.php?SearchID=$1&page=$2 [QSA,L] RewriteRule ^search/saved/([0-9]+)/([0-9]+)/$ search.php?SearchID=$1&page=$2 [QSA,L] #Post RewriteRule ^post/$ post.php [QSA,L] RewriteRule ^post/([0-9]+)$ post.php?CommentID=$1 [QSA,L] RewriteRule ^post/([0-9]+)/$ post.php?CommentID=$1 [QSA,L] RewriteRule ^post/category/([0-9]+)$ post.php?CategoryID=$1 [QSA,L] RewriteRule ^post/category/([0-9]+)/$ post.php?CategoryID=$1 [QSA,L] #Settings RewriteRule ^settings/$ settings.php [QSA,L] #People RewriteRule ^people/$ people.php [QSA,L] #extension RewriteRule ^extension/$ extension.php [QSA,L] #Poll extension RewriteRule ^extension/([0-9]+)/$ extension.php?DiscussionID=$1 [QSA,L] RewriteRule ^discussion/$ comments.php [QSA,L] # Prevent some little bad effects of Friendly Urls on relative links in some # extensions RewriteRule ^(discussions|categories|search|post|settings|people|extension|[0-9]+)/(extensions|themes|images|ajax|js)/(.*) $2/$3 [QSA,L] RewriteRule ^(discussions|categories|search|post|settings|people|extension|[0-9]+)/(account.php|categories.php|comments.php|extension.php|index.php|people.php|post.php|search.php|settings.php|termsofservice.php) $2 [QSA,L] RewriteRule ^(discussions|account|search|post|[0-9]+)/.+/(extensions|themes|images|ajax|js)/(.*) $2/$3 [QSA,L] RewriteRule ^(discussions|account|search|post|[0-9]+)/.+/(account.php|categories.php|comments.php|extension.php|index.php|people.php|post.php|search.php|settings.php|termsofservice.php) $2 [QSA,L]
http://forum/post/1/?
also while we're squashing mod-rewrite bugs how come when I go to http://forum/account/6/ it takes me to my profile rather than the person who's supposed to be there?
RewriteRule ^post/$ post.php [QSA,L]
and then try going to post/1/ again?
commenting out RewriteRule ^post/$ post.php [QSA,L] still takes me to the Start a new Discussion page.