Copied to clipboard

Flag this post as spam?

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


  • Dan 1288 posts 3942 karma points c-trib
    Apr 08, 2010 @ 11:07
    Dan
    0

    ISAPI rewrite and Umbraco

    Hi,

    I have a site due to go live imminently, but I need to arrange redirects from the old site URLs to the new ones.  The old site was a mixture of plain HTML  pages and 'classic ASP' pages ('.asp').

    I have a spreadsheet of old URLs mapped to new URLs and am looking to set these up as redirects now.  I've tried redirecting on a previous site, using the Umbraco URLRewriting.config file, but had major issues with it not working for '.htm' files (I had to do some updates in IIS to pass .htm files through the .NET processor, which then created major problems with the functioning of Umbraco itself).  As a result, I'd prefer to use ISAPI rewrite, which is installed on the server.  Question is, if I use ISAPI Rewrite will it have any side-effects on the website, or can I just run it confidently without risk of anything going wrong?

    Thanks all.

  • Lee Kelleher 4026 posts 15837 karma points MVP 13x admin c-trib
    Apr 08, 2010 @ 11:17
    Lee Kelleher
    0

    Hi Dan,

    I use ISAPI_Rewrite on several client sites, (with Umbraco), had no problems with it!  As long as the rules in your .htaccess file don't conflict with UrlRewriting, all should be fine!

    Cheers, Lee.

  • Dan 1288 posts 3942 karma points c-trib
    Apr 08, 2010 @ 18:38
    Dan
    1

    Cheers Lee - did it and it worked a charm.

    For reference, if anyone's interested, the syntax for this kind of thing in the .htaccess file is like this:

    RewriteBase /

    RewriteRule ^old-asp-page\.asp$ http://www.mydomain.com/new-umbraco-page.aspx [NC,R=301,L]
  • Marco Lusini 176 posts 1370 karma points
    Apr 09, 2010 @ 13:20
    Marco Lusini
    1

    ISAPI_Rewrite is fine, but has a free and commercial version.

    If you are on a budget, you may try Ionics Isapi Rewrite Filter, which is OpenSource.

    You can find it on Codeplex: http://iirf.codeplex.com/Wikipage

  • Rik Helsen 670 posts 873 karma points
    Apr 09, 2010 @ 14:57
    Rik Helsen
    0

    Is there a reason why you don't use the built-in config file for rewrite rules?

    /config/UrlRewriting.config

     

    <urlrewritingnet xmlns="http://www.urlrewriting.net/schemas/config/2006/07">
    <rewrites>
    <!--
    Urlrewriting.Net is a cool tool, what can make your urls look nice.
    The rewriting is controlled with regular expressions. To get more help
    look at http://www.urlrewriting.net/.

    Remember to read the manual!
    http://www.urlrewriting.net/download/UrlRewritingNet20.English.pdf

    The sample below rewrites a url from
    "/product/someproductid.aspx" to
    "/product.aspx?productid=someproductid"

    The user will not see the rewritten path! The page that will be
    loaded from umbraco will instead be:
    "/product.aspx?productid=someproductid"

    <add name="produktidrewrite"
    virtualUrl="^~/product/(.*).aspx"
    rewriteUrlParameter="ExcludeFromClientQueryString"
    destinationUrl="~/product.aspx?productid=$1"
    ignoreCase="true" />

    This sample is usefull for a productpage, where the product comes from a
    dynamic datasource, e.g. a database. The querystring "productid" can be loaded
    from the template, into a macro, that then loads the product!

    Any bugs or problems with the rewriter, contact Anders/Duckie
    -->
    </rewrites>
    </urlrewritingnet>
  • 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.

Please Sign in or register to post replies