Copied to clipboard

Flag this post as spam?

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


  • Cornelia 31 posts 53 karma points
    Jan 05, 2010 @ 15:05
    Cornelia
    0

    UrlRewriting.config - Umbraco does not handle .asp

    Dear Umbraco-Users

    I changed from the older .asp-Version to Umbraco with .net. Now I need a 301-Redirect or Rewriting from the older Files (.asp) to a page from Umbraco with .aspx.

    I tried to do that with the following code in UrlRewriting.config, but Umbraco does ignore this (with files with .aspx it works):

        <add name="Redirect01"
          virtualUrl="http://www.xyz.ch/ichweissnicht.asp"
          destinationUrl="http://www.xyz.ch/Default.aspx"
          redirect="Domain"
          redirectMode="Permanent"
          ignoreCase="true" />

    What can I do that Umbraco also can candle .asp?

    Thanks

    Cornelia

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Jan 05, 2010 @ 15:11
    Chris Houston
    0

    Hi Cornelia,

    If you have access to IIS you can change IIS to pass the .ASP pages so they are processed by the .NET handler and then your code will hit the Url rewriting.

    ( I think... although I have not tested this )

    Cheers,

    Chris

  • Cornelia 31 posts 53 karma points
    Jan 05, 2010 @ 15:30
    Cornelia
    0

    Hi Chris

    I have a Shared-Account with a Hosting-Company. I'll phone them and ask.

    Thanks
    Cornelia

  • Jamie Howarth 306 posts 773 karma points c-trib
    Jan 05, 2010 @ 15:40
    Jamie Howarth
    0

    Hi Cornelia,

    You'll be hard-pushed to get a hosting company to change the way IIS handles .asp requests. The best way to do this on shared hosting is to write a custom 404 page and use that, where the general idea is that you create a script page (classic ASP or .NET) that acts as your 404 page, and then you test the "not found" URL (which gets passed to the 404 page by querystring) and redirect it to the Default.aspx page.

    Hope this helps.

    Benjamin

    P.S. If you're running in Medium Trust you'll need to use my build of Umbraco 4.0.3, not the one on Codeplex, as this does not yet run in Medium Trust.
    If you are using Blog4Umbraco and <msxml:script> blocks on your installation, I suggest you check out the wiki page for Umbraco on Medium Trust.

  • Cornelia 31 posts 53 karma points
    Jan 14, 2010 @ 21:02
    Cornelia
    0

    Hi Benjamin

    The Hoster could install an ISAPI-Filter. So I could define rules with the ISAPI-Filter and solve my problem.

    Thanks all for your input.

    Cornelia

Please Sign in or register to post replies

Write your reply to:

Draft