Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi all
In Umbraco v8, I am trying to get a content finder to work for .html pages.
Currently the content finder only fires if the url doesn't end in .html
Does anyone know how I can get Umbraco to see .html urls as umbraco requests please so I can handle them with a content finder.
Kind regards
Paul
I would have thought you'd need to add IIS handler mappings so that html files are picked up by Isapimodule?
Yep as Umbraco won't get the hit with calls to .html IIS will handle it and try to return a static file.
Found this post which might be useful https://our.umbraco.com/forum/umbraco-7/developing-umbraco-7-packages/64607-Handling-static-file-extensions-to-find-content
Ok so now I don't know how to get the Umbraco Context from within an HttpHandler.
Current is null so I can't use that. Anyone got any ideas?
Current
Haven't made a httpHandler in a long time but if I remember correctly they run before Umbraco so context may not be available. Might be a work around/hack though. Can you not do what you are doing with an IComponent?
I got it working in the end thanks for all of your help.
I used a combination of Barry's answer in the link Richard gave, and also this https://github.com/vegaitsourcing/patrija/blob/1475bc9fe312329c916ea11cfa286e7bc9c6a6d5/Patrija.Core/HttpHandlers/RobotsHandler.cs
It now works how I need it to, although it's not pretty 😆
Thanks again
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Handling .html urls with a ContentFinder
Hi all
In Umbraco v8, I am trying to get a content finder to work for .html pages.
Currently the content finder only fires if the url doesn't end in .html
Does anyone know how I can get Umbraco to see .html urls as umbraco requests please so I can handle them with a content finder.
Kind regards
Paul
I would have thought you'd need to add IIS handler mappings so that html files are picked up by Isapimodule?
Yep as Umbraco won't get the hit with calls to .html IIS will handle it and try to return a static file.
Found this post which might be useful https://our.umbraco.com/forum/umbraco-7/developing-umbraco-7-packages/64607-Handling-static-file-extensions-to-find-content
Ok so now I don't know how to get the Umbraco Context from within an HttpHandler.
Current
is null so I can't use that. Anyone got any ideas?Haven't made a httpHandler in a long time but if I remember correctly they run before Umbraco so context may not be available. Might be a work around/hack though. Can you not do what you are doing with an IComponent?
I got it working in the end thanks for all of your help.
I used a combination of Barry's answer in the link Richard gave, and also this https://github.com/vegaitsourcing/patrija/blob/1475bc9fe312329c916ea11cfa286e7bc9c6a6d5/Patrija.Core/HttpHandlers/RobotsHandler.cs
It now works how I need it to, although it's not pretty 😆
Thanks again
Paul
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.