PDA

View Full Version : Changing vb5.0 urls


ghostofkc
04-26-2013, 05:10 PM
I just set up a new install of VB5.0 after a recent upgrade. Not even sure what this is called to search for it. Sorry for the probably duplicated post -

My problem is this -

I renamed the default forum from "main-forum" to "new_name" but the url still says
"mysite.com/forum/main-category/main-forum"
when I want it to say
"mysite.com/forum/new_name"

This seems like something that should automatically update or there should be an update tool somewhere for the links.

Anyone know what I should do?


Thanks! :confused:

Ben.Smith
04-26-2013, 06:48 PM
I'm not that sure whether that can be configured in vB itself or not.

So once looking through the options, i'd go for a url-rewrite in your .htaccess file ;)

ghostofkc
04-26-2013, 07:00 PM
but the link is being generated by vbulletin its not something i am making by hand. I just renamed an existing forum but it did not change the name in the URL.

http://knightsofchaos.org/forum/main-category that link points to a forum called "public news" not main-category. Can I not rename existing forums anymore?

Ben.Smith
04-26-2013, 07:34 PM
Just tried it and it works for me.

Did you try clearing the system cache?

Lynne
04-26-2013, 07:46 PM
It's a bug - http://tracker.vbulletin.com/browse/VBV-6125

It needs to be done via that database - the routenew table, field regex - and there should be two rows to change (the routeids should be consecutive). Actually, if it is a parent forum, then you would have to also change it for all the rows of the child forums also.

Make sure you do a database backup prior to making ANY changes to your database!!!!

ghostofkc
04-26-2013, 08:50 PM
Thanks for the information - I will just switch back to version 4 and upgrade when 5 is ready. Its not worth messing around with the database. Hopefully a fix comes out in the next few weeks:up:

JesusSuarz
05-29-2018, 03:25 AM
Hello

The best way to achieve this is with a sql statement.

run this on phpmyadmin to leave your forum at yourforum.com/


UPDATE routenew SET prefix = REPLACE(prefix, 'forum/', '');
UPDATE routenew SET regex = REPLACE(regex, 'forum/', '');


the url will remain as yourforum.com/sub-forum/asdasdasd

if you want your forum to be otherwise.

For example: yourforum.com/foro2/sub-forum

then it will be like this:



UPDATE routenew SET prefix = REPLACE(prefix, 'forum/', 'foro2');
UPDATE routenew SET regex = REPLACE(regex, 'forum/', 'foro2');



please remember to create backup of your database before doing this.

You can see a demo on my site.

https://hastlegames.com

Cruisey
09-26-2018, 07:15 AM
Hello

The best way to achieve this is with a sql statement.

run this on phpmyadmin to leave your forum at yourforum.com/


UPDATE routenew SET prefix = REPLACE(prefix, 'forum/', '');
UPDATE routenew SET regex = REPLACE(regex, 'forum/', '');


the url will remain as yourforum.com/sub-forum/asdasdasd

if you want your forum to be otherwise.

For example: yourforum.com/foro2/sub-forum

then it will be like this:



UPDATE routenew SET prefix = REPLACE(prefix, 'forum/', 'foro2');
UPDATE routenew SET regex = REPLACE(regex, 'forum/', 'foro2');



please remember to create backup of your database before doing this.

You can see a demo on my site.

https://hastlegames.com

Based on this, do we need to always manually run that script/code? Is this permanent when a user creates a new content? I'll start a new topic on this subject.

delicjous
09-27-2018, 04:21 AM
I Think that is not the best way and I know there are some tutorials(in posts) from wayne at vbulletin.com but I could not find it with my quick search.

I think you could edit the url by editing the template in sitebuilder...

In Omnibus
09-27-2018, 07:10 AM
This thread is five years old and, no, the best way to change a URL is not to use a replace command. The best way is to actually change the root URL. vBulletin 5 redirects URLs from previous versions without running SQL commands.

Cruisey
09-27-2018, 07:51 AM
Maybe 5 years ago but we still dealing with vBulletin 5. The code above does work but curious what implications it has on doing so.

prefix columns has the forum/abcd/... on it, how else to change that? vBulletin was installed to example.com/forum. We have example.com/forum/forum. No need to for the extra "/forum"