XF 2.2 Changing forums URL portion

Anatoliy

Well-known member
Years ago I set URL portion for forums, so now urls look like /forums/salmon-fishing-in-oregon/. Now I'd like to change them to be like /forums/salmon/ or maybe even better just /salmon/.

My first thought was to use Route filters with find forums/salmon-fishing-in-oregon/ replace salmon/. But when I created it and checked if 301 redirect was created I found out that forums/salmon-fishing-in-oregon/ still returns 200. In a browser I get redirected to /salmon/ so for visitors it works as supposed, but I'm concerned that now google will see 2 identical copies of each of my forum (with old and new urls), and I don't think that it's good.

My second thought was just to edit forums url portions from /forums/salmon-fishing-in-oregon/ to /forums/salmon/. This time old url returns 404 which is also not good.

So it looks to me that in both cases I'll have to add a redirect record for each forum into htaccess file. Is that true or I don't know something and there is a better solution?
 
My second thought was just to edit forums url portions from /forums/salmon-fishing-in-oregon/ to /forums/salmon/. This time old url returns 404 which is also not good.

This is what I'd recommend (because it'd likely be easier) and, yes, you will have to do redirects using htaccess to get the old URLs to point to the new URLs.
 
Top Bottom