« Previous Next »

Answered Thread: rewrite ALL REQUESTS except files?

Last post 08-13-2009 12:29 PM by DanielVL. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 08-12-2009, 10:21 PM

    • Jibbs22
    • Not Ranked
    • Joined on 08-13-2009, 2:18 AM
    • Posts 1

    rewrite ALL REQUESTS except files?

     hi all

     I just started using this rewrite application before I was using apache (still am just using this for a client that is windows-only)

    Anyways, I need to rewrite all requests that aren't existing files to my index.php file which handles the request from there

     so basically..

     http://yoursite.com/anything_here or http://yoursite.com/this/is/a/page

    gets redirected, while

     http://yoursite.com/images/file.jpg doesn't

    know I don't know what files could be in there, heck it could be an entirely different user folder, basically i need a "IF IS NOT A FILE REWRITE" condition

     any help would be awesome! 

  • 08-13-2009, 12:29 PM In reply to

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

    Answered Re: rewrite ALL REQUESTS except files?

    You can check if a requested URL is, or is not, a file by using <conditions><add type="IsFile" negate="true"/></conditions>, but if you are more familiar with Apache syntax, you can use the Import Rules features and type the Apache rules and then we'll do our best for translating the Apache syntax to IIS URL Rewrite Module. Here is how:

    http://learn.iis.net/page.aspx/470/importing-apache-modrewrite-rules/

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