asked    Horace     2018-10-12       iis       30 view        1 Answer

[SOLVED] How to set a condition in IIS UrlRewrite to check if the URL is valid

I have an issue with setting an condition for my IIS URLRewrite to set it so when the entered url is not valid then it takes you to a set url. for instance you type url: example.local/current_work that would be a valid url so it shows the page however for url : example.local/this_doesnt_exist it will redirect you back to the example.local/current_work etc...

Hope I am clear on this one.

  <rule name="Test" stopProcessing="true">
   <match url="^scottishtrunkroadsse.amey.local/([_0-9a-z-]+)" negate="false"/>
         <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
         <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
   <action type="Redirect" url="current-works/" />

Thank you for any help.

I am using an Umbraco website but I don't think that change anything as the IIS url should be working in the same way.

Thank you in advance.

  1 Answer  

        answered    Betty     2018-10-12      

This rule will redirect example.local/this_doesnt_exist to example.local/current_work:

<rule name="Test" stopProcessing="true">
   <match url="^this_doesnt_exist$" />
   <action type="Redirect" url="/current_work" />

Your Answer

 2018-10-12         Kristin

Umbraco Carousel Content

I am putting together my first Umbraco project and starting to pick it up nicely. I am a little stuck at creating an appropriate repeatable field for a Carousel with text, image and a link but also how to output that in a template.I come from a Craft CMS / Expression Engine background and would usually use a repeatable field like Matrix or Grid for such a task.Any help would be fantastic!Thanks!-Graham Check Nested Content package (it will be included in Umbraco Core soon): and then create appropriate...
 content-management-system                     1 answers                     10 view
 2018-10-12         Jason

Umbraco 7: custom dropdown dynamically populated from Items in a specific node

I have a "Language" document type, and under my site's Content I have a folder called "Languages" which contains all the languages we support.I created a custom Data Type called "Languages Dropdown", and I want this dropdown to be populated from the instances of "Language" present at a specific path.This is my default Sitecore thinking in action. Is such a thing even possible in Umbraco? Certainly - first of all, take a look at nuPickers and see if that can do what you want - 99% of the time this sort of thing can be handled really easily with that package:
 content-management-system                     1 answers                     12 view
 2018-10-12         Bella

Umbraco 7.3.4 - Custom Data Type Value Doesn't Change

I have created a custom data type to deal with character limits on text areas. I have previously been following a demo where $ = "Hello World" before the user started typing in the text area. I have since deleted this so it should have removed this text from the umbraco content interface. But it is still showing the "Hello World" On the right side of the text box. Customer Editor Angular Controller: angular.module("umbraco").controller("My.CustomEditorController", function ($scope, notificationsService) { $ = ""; $scope.limitChars = fun...
 angularjs                     1 answers                     13 view