Vanity Redirects

Vote:
 

There are some old threads about Vanity URLs with broken links, so I'm re-upping this for current information.

At this time we have content folks manually adding vanity URLs using a built-in CMS feature, the Custom Redirects Manager.

We want to automate insertion of the vanity URL such that it appears just as if they had manually entered it in the Custom Redirects Manger. How is this accomplished through the API? If there's not API support for it, can we go directly to the DB?

--Bob

#269534
Edited, Jan 06, 2022 16:06
Vote:
 

I do see that this data appears to be stored in table 404Handler.Redirects and given that our nighly batch process for adding new "sites" and deactivating old ones is effectively an off-hours singleton, I would be comfortable directly updating this table -- but would prefer to go through the API if there is one.

#269541
Jan 06, 2022 16:47
Vote:
 

Not quite an answer to your question, but hopefully points you in the right direction -- if the redirects are stored in the 404Handler.Redirects table, then I suspect the site is using the Geta 404 handler add-on (formerly BVN404handler) (.NET5/CMS 12 version here).

IRedirectsService.cs might be the place to look?

#269636
Jan 07, 2022 15:40
Vote:
 

Thanks Daniel; I'll check it out!

--Bob

#269833
Jan 11, 2022 16:20
Vote:
 

Thanks Daniel; I'll check it out!

--Bob

#269834
Jan 11, 2022 16:20
Vote:
 

This is a 3rd Party AddOn, I will favour to use DB directly, have a look this implementation https://github.com/Geta/404handler/blob/master/src/Geta.404Handler/Core/Data/SqlRedirectRepository.cs

#269838
Jan 11, 2022 20:37
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.