https://kotlinlang.org logo
#ktor
Title
# ktor
g

gaetan

05/15/2021, 10:07 AM
Hi, I’m working on the documentation pages of our Charts.kt library (see https://charts-kt.io/documentation/)  All the pages are statically installed using a path like
/documentation/{version}/page1/
I want to redirect some direct links not containing the version number of the documentation to the last version of the doc.
/documentation/page1/
-> redirect to ->
/documentation/1.0/page1/
However, when I install a redirect at the root of documentation, it is never called:
Copy code
route("documentation") {

            intercept(ApplicationCallPipeline.Features) {
                <http://logger.info|logger.info>("Calling:: " + call.request.path())
            }
Any ideas why the interception is never called?
a

Aleksei Tirman [JB]

05/17/2021, 11:51 AM
Most likely because this route is not resolved. If you request
/documentation/page1/
then interception will work only on the child route
page1
.