Skip to content

How to use Sendy on Windows/IIS

edited May 2017 in Contributions

You simply need to have the following rewrite rules in your web.config in the sendy folder (this is IIS equivalent of mod_rerite)
If you are running sendy from the root and not from a sendy sub directory, then simply remove /sendy from the rules.

 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
     <system.webServer>
         <rewrite>
             <rules>

                 <clear />
                 <rule name="Sendy all" stopProcessing="true">
                    <match url="^([a-zA-Z0-9-]+)$" ignoreCase="true" />
                    <action type="Rewrite" url="/sendy/{R:1}.php" appendQueryString="true" />
                    </rule>

                    <rule name="Sendy: link tracker" stopProcessing="true">
                    <match url="^/l/([a-zA-Z0-9/]+)$" ignoreCase="true" />
                    <action type="Rewrite" url="/sendy/l.php?i={R:1}" appendQueryString="true" />
                    </rule>

                    <rule name="Sendy: open tracker" stopProcessing="true">
                    <match url="^/t/([a-zA-Z0-9/]+)$" ignoreCase="true" />
                    <action type="Rewrite" url="/sendy/t.php?i={R:1}" appendQueryString="true" />
                    </rule>

                    <rule name="Sendy: web version" stopProcessing="true">
                    <match url="^/w/([a-zA-Z0-9/]+)$" ignoreCase="true" />
                    <action type="Rewrite" url="/sendy/w.php?i={R:1}" appendQueryString="true" />
                    </rule>

                    <rule name="Sendy: unsubscibe" stopProcessing="true">
                    <match url="^/unsubscribe/(.*)$" ignoreCase="true" />
                    <action type="Rewrite" url="/sendy/unsubscribe.php?i={R:1}" appendQueryString="true" />
                    </rule>

                    <rule name="Sendy: subscribe" stopProcessing="true">
                    <match url="^/subscribe/([a-zA-Z0-9/]+)$" ignoreCase="true" />
                    <action type="Rewrite" url="/sendy/subscribe.php?i={R:1}" appendQueryString="true" />
                    </rule>
             </rules>
         </rewrite>

     </system.webServer>
 </configuration>
This discussion has been closed.