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
Is there any way in Umbraco 8 to take a route with a .htm extension and route it to an umbraco page? For example, I simply want:
/page.htm
to route to my Umbraco site:
/Page
I have tried using Umbraco Url Alias, but that doesn't seem to work with file extensions.
I have found a few Umbraco 7 solutions, but nothign that will work with 8.
Hi,
I think this rewrite rule will work - you can add it in the web.config.
<rules> <rule name="Rewrite .htm ext"> <match ignoreCase="true" url="^(.*).htm"/> <conditions logicalGrouping="MatchAny"> <add input="{URL}" pattern="(.*).htm"/> </conditions> <action type="Rewrite" url="{R:1}"/> </rule>
More info here: https://our.umbraco.com/documentation/Reference/routing/iisrewriterules/
You are the man! Didn't think of the easy way... thank you so much!
Note: The above will break your Back Office, but I changed it slightly to knly catch room level .htm requests:
<rewrite> <rules> <rule name="Rewrite .htm ext"> <match ignoreCase="true" url="^(\w*).htm"/> <conditions logicalGrouping="MatchAny"> <add input="{URL}" pattern="(.*).htm"/> </conditions> <action type="Rewrite" url="{R:1}"/> </rule> </rules> </rewrite>
Or maybe, I think you need to add a negation.. something like
<rules> <rule name="Rewrite .htm ext"> <match ignoreCase="true" url="^(.*).htm"/> <conditions logicalGrouping="MatchAny"> <add input="{URL}" pattern="(.*).htm"/> <add input="{REQUEST_URI}" url="^umbraco/.*" negate="true" /> </conditions> <action type="Rewrite" url="{R:1}"/> </rule>
That's even better
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Routing /page.htm to /Page (Url alias with a dot/extension in them)
Is there any way in Umbraco 8 to take a route with a .htm extension and route it to an umbraco page? For example, I simply want:
/page.htm
to route to my Umbraco site:
/Page
I have tried using Umbraco Url Alias, but that doesn't seem to work with file extensions.
I have found a few Umbraco 7 solutions, but nothign that will work with 8.
Hi,
I think this rewrite rule will work - you can add it in the web.config.
More info here: https://our.umbraco.com/documentation/Reference/routing/iisrewriterules/
You are the man! Didn't think of the easy way... thank you so much!
Note: The above will break your Back Office, but I changed it slightly to knly catch room level .htm requests:
Or maybe, I think you need to add a negation.. something like
That's even better
is working on a reply...