0

I am migrating a site from a legacy PHP (not WordPress) CMS with a specific URL pattern for categories & products to Kentico 11 webforms. With plans in 2021 to migrate to v13 / MVC!

Does Kentico have a helper function or extension that will map URL requests which can be correlated to a pattern in Kentico? This would redirect users to the appropriate product category, grid, or detail page and not end up at a 404.

The existing site uses the following pattern for Products. index.php/home/category/{0}/{00}/{00}/(00000} Each path corresponds to a common set of categories, sub categories, general products and specific products (size, color, accessories, etc.) There are over 550 specific products across 7 categories.

.com/index.php/home/category/1/18/15/17999 would map to .com/category/products/product-type/standard

https://devnet.kentico.com/articles/url-redirection will not work because I have to maintain each redirect individually.

Racingman
  • 18
  • 3
  • Perhaps the Global Event Handler [link](https://medium.com/distinctionuk/creating-custom-redirects-in-kentico-ab0af0fd3196) can be overridden to check for a URL match and redirect. I'm just not sure placing that on the Page Init makes the most sense. Every request would get processed. I would imagine putting a override on the 404 would be more appropriate. Is there a method in Kentico? – Racingman Oct 28 '20 at 18:32
  • I haven't found a solution to this specific scenario. However I do have a suitable solution that requires the creation of a custom table with fields OldURL, NewURL and RedirectCount. Along with a new method in the Application Init where it will do a lookup to the CustomTable and determine if a redirect is listed. My hesitation to this type of handler is that it fires for each URL call increasing the processing for each content page. I would rather see this happen prior to the 404 being raised but it is a workaround. – Racingman Nov 20 '20 at 14:53

0 Answers0