« Previous Next »

Thread: Rewriting won't work

Last post 11-30-2008 10:05 PM by DanielVL. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 11-25-2008, 3:43 PM

    • Echilon
    • Not Ranked
    • Joined on 11-02-2008, 3:05 PM
    • Chester, UK
    • Posts 9

    Rewriting won't work

    I'm having problems getting URL rewriting to work. I don't get any 500 errors when using the following, but when I try to access the rewritten URL I get a 404.

    Am I doing something wrong?

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <configSections>
            <section name="urlrewritingnet" restartOnExternalChanges="true"
                     requirePermission="false"
                     type="UrlRewritingNet.Configuration.UrlRewriteSection,  UrlRewritingNet.UrlRewriter"  />
        </configSections>
        <system.web>
            <httpModules>  
                <add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
                <add name="RewriteModule" type="RewriteModule.RewriteModule, RewriteModule"/>
            </httpModules>
        </system.web>
        <system.webServer>
            <security>
                <authentication>
                    <basicAuthentication enabled="false" />
                </authentication>
            </security>
            <defaultDocument>
                <files>
                    <clear />
                    <add value="Default.htm" />
                    <add value="Default.asp" />
                    <add value="index.htm" />
                    <add value="Default.aspx" />
                    <add value="index.php" />
                </files>
            </defaultDocument>
            <httpRedirect enabled="false">
                <clear />
            </httpRedirect>
            <handlers>
                <remove name="SecurityCertificate" />
                <remove name="ASPClassic" />
                <remove name="PHP FastCGI" />
                <add name="PHP via FastCGI (*.php)" path="*.php" verb="GET,HEAD,POST,DEBUG" modules="FastCgiModule" scriptProcessor="C:\PHP5\php-cgi.exe" resourceType="File" />
            </handlers>
            <httpProtocol>
                <customHeaders>
                    <clear />
                    <add name="X-Powered-By" value="ASP.NET" />
                </customHeaders>
            </httpProtocol>
            <modules runAllManagedModulesForAllRequests="true">  
                <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule" />
            </modules>
        </system.webServer>
        <urlrewritingnet rewriteOnlyVirtualUrls="true" contextItemsPrefix="QueryString" defaultPage="default.aspx" xmlns="http://www.urlrewriting.net/schemas/config/2006/07" >  
            <rewrites>
                <add name="Work"  
                     virtualUrl="^~/work/"  
                     destinationUrl="~/index.php?page=portfolio"  
                     ignoreCase="true"
                     rewriteUrlParameter="IncludeQueryStringForRewrite"
                     />  
            </rewrites>
        </urlrewritingnet>
    </configuration>
  • 11-30-2008, 10:05 PM In reply to

    • DanielVL
    • Top 75 Contributor
    • Joined on 10-07-2006, 2:00 PM
    • Redmond, WA, USA
    • Posts 109

    Re: Rewriting won't work

    This forum is about this URL Rewriter:

    http://www.iis.net/extensions/urlrewrite

    Daniel Vasquez Lopez
    URL Rewrite Engine Developer
Page 1 of 1 (2 items)
Microsoft Communities