Skip to content

web.config rewrite rules #80

ParHaggstrom opened this Issue Oct 10, 2012 · 4 comments

3 participants



I'm trying to get this to work on a Windows server and cant seem to find an example of a typical rewrite rule for a web.config file.

Is there any such file?

Anything else thats needs concideration when applying Adaptive-Images to Windows and not a Unix environment?

Thanks. Pär


Hi there :)

I'm afraid I can't help you with this as I have never used Windows as a server :s If you're using Apache+PHP it should still be fine, but if you're using some other webserver, like IIS, you'll need to see what equivalents it has to Apache's .htaccess. I'm sure it's doable, I just don't know how.



Oh thanks anyway, and thanks for the quick reply.

I'll give it a try, If I get it to work I'll post the solution.


Hi again.

After some troubleshooting. Here's my rewrite rules I have for my Wordpress installation copy/pasted.

        <compilation debug="false" targetFramework="4.0"/>
                <rule name="images">
                    <match url="\.(?:jpe?g|gif|png)$" />
                        <add input="{URL}" pattern="^\/wp-content\/uploads\/" />
                    <action type="Rewrite" url="/adaptive-images.php" />
                <rule name="wordpress" patternSyntax="Wildcard">
                    <match url="*"/>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
                    <action type="Rewrite" url="index.php"/>

This sure is a great plugin. Great work and thanks Matt


is it possible to add watermarks to images already in a web directory using this kind of method in web.config,, thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.