Kentico redirect based off URL

Alicia734 Jeffrey asked on November 29, 2018 06:46

We have sales rep profile pages that need to be access by firstname.lastname. So an example URL would be www.mysite.com/mark.handy. This redirect to Find-A-Rep-Detail.aspx?SalesRepWebID=mark.handy.

We're currently are buildingout at a big complicated URL Rewrite that looks at the extension and goes from there. It works, but means we need to managing this either in IIS or the web.config across multiple servers.

I'm looking at a way to do this within kentico. I know the community site has profile pages that seem to take a user's firstname.aspx and redirect to a profile page.

The kentico solution would have to check the URL and if the extension doesn't match a list (aspx, html, js, css, asmx, etc) then redirect.

Here's the kicker. Our user data isn't in kentico. we have a .asps page that has a user control that grabs the name and returns the html.

I'm looking at the wildcard URL docs: https://docs.kentico.com/k9/configuring-kentico/configuring-page-urls/wildcard-urls liteblue

Is this possible in Kentico, or should we stick with the iis/web.config options?

Recent Answers


Jan Hermann answered on November 29, 2018 12:51

In Kentico you can configure wildcard urls that transforms part of the url to specified query string whilst the url stays unchanged:

www.mysite.com/mark.handy -> would internally be www.mysite.com/Find-A-Rep-Detail.aspx?SalesRepWebID=mark.handy

for example and then the Find-A-Rep-Detail.aspx can load the data from any source you need.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.