Looking for a developer to help us keep old VB URLs

There are several references that pertain to redirecting old imported VBulletin URLs.

For example:
VB Add on
https://xenforo.com/community/resources/xenforo-redirects-for-vbulletin.6123/

Redirection after Import
https://xenforo.com/help/import-redirection/

Redirection with Routing Filters
https://xenforo.com/community/threads/seo-link.134595/#post-1177153

Most of these require a 301 redirect. In the past,we've tried to redirect another site that had many old inbound links and the redirects caused us to lose traffic.
We're looking for a developer who could help us keep our existing/old VB URLs after the migration to Xenforo 2.02, without having to 301 redirect all of the thread URLs.

The formula for the threads would be:
https://[ourdomain.com]/[forumtitle]-[forumID]/[threadtitle]-[threadID].html
 
Actually, we would need our new Xenforo Thread URLs to include the forumTitle and forumID.

Also, our forum is on its own server, so the forum files are in the root of the domain (we won't need /community/).

So instead of this:
https://xenforo.com/community/threads/{ThreadTitle}.{ThreadId}

We would need our public URLs to be:
https://ourdomain.com/{ForumTitle}-{ForumId}/{ThreadTitle}-{ThreadId}.html


Could that be done in a way that Google wouldn't need to see a 301 redirect?
 
I'm not 100% sure on this but I don't think that would be possible. I don't see a way to add the forum title and forum id in the URL without making major changes to the routing system.

I'm not sure how many other ways I can tell you :p

It can be done with the "Route Filters" system in the Admin CP! It does require you to have clicked the "Retain content IDs" option I mentioned before, but this is what you need to enter on that page after clicking "Create Route Filter":

Find route:
Code:
threads/{name:string}.{name:digit}

Replace with:
Code:
threads/{name:digit}-{name:string}.html

If we did that here then the URL of this thread would change from:
Code:
threads/seo-link.134595/
To:
Code:
threads/134595-seo-link.html/

The only thing we don't support in XF at all is displaying the forum or category name in the URL. So my recommendation there would be to implement route filters again or server side redirects which convert, e.g. "espresso/" to "threads/" (and all of your other old forum names) and that should pretty much take care of redirection.

Last line of that post suggests that there could a server side redirect which converts the route "espresso" to "threads". This implies that there has to be something between URL and {ForumTitle} which can be hooked onto.


However, there is a way where you can have the URL
https://ourdomain.com/{ForumTitle}-{ForumId}/{ThreadTitle}-{ThreadId}.html
show contents of something like
https://ourdomain.com/threads/{ThreadTitle}.{ThreadId} without a 301 redirect.
 
Code:
RewriteRule ^/?([a-zA-Z]+)-([0-9]+)\/([a-zA-Z]+)-([0-9]+) index.php?threads/$3.$4 [L]

Add this to your .htaccess file. I haven't tested it but something like this should work for you.
 
Top Bottom