Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • JoskerVemeulen 68 posts 262 karma points
    Mar 14, 2019 @ 08:54
    JoskerVemeulen
    0

    UrlRewriting in Umbraco 8

    I'm trying to setup a robots.txt. Where do i config the UrlRewriting in Umbraco 8. Can't seem to find it.

    Thanks!

  • Claushingebjerg 939 posts 2574 karma points
    Mar 14, 2019 @ 09:01
    Claushingebjerg
    0

    Int the Web.Config i would think.

  • JoskerVemeulen 68 posts 262 karma points
    Mar 14, 2019 @ 15:55
    JoskerVemeulen
    0

    Those are IIS rewrite rules. In V7 there was a ~\Config\UrlRewriting.config But i'm looking for a V8 solution.

    Thanks

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Mar 14, 2019 @ 16:12
    David Brendel
    100

    Hi Josker,

    The UrlRewriting was removed. Use the IIS rewrites instead.

  • Warren Harding 132 posts 275 karma points
    Mar 14, 2019 @ 22:58
    Warren Harding
    0

    Make sure you have this installed for IIS - https://www.iis.net/downloads/microsoft/url-rewrite

    Search the web.config file for: IIS rewrite rules

    And add something like this:

    <rewrite>
          <rules>
            <rule name="LogoutRewrite" stopProcessing="true">
              <match url="^Logout/?$" />
              <conditions>
                <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
              </conditions>
              <action type="Rewrite" url="/umbraco/Surface/LoginForm/Logout" />
            </rule>          
          </rules>
        </rewrite>
    
  • Warren Harding 132 posts 275 karma points
    Mar 14, 2019 @ 22:59
    Warren Harding
    0
    • that doesn't help with the robots.txt file though sorry, just a different example
  • John McKillip 33 posts 116 karma points
    Apr 10, 2019 @ 21:08
    John McKillip
    0

    I just got got the robots.txt stuff working in V8 and this is the rule I used for the rewrite:

    <rule name="robots.txt" stopProcessing="true">
    <match url="^robots.txt" />
    <action type="Rewrite" redirectType="Permanent" url="{path to robots page in umbraco}" /></rule>
    
  • Flemming 4 posts 85 karma points
    Apr 11, 2019 @ 09:29
    Flemming
    0

    Exactly what i was looking for also!

    It worked for me.

    Thanks for sharing.

Please Sign in or register to post replies

Write your reply to:

Draft