在Windows Azure网站上设置YOURLS网址缩短器

时间:2015-02-24 06:41:10

标签: azure yourls azure-pack

我尝试按照this article在我的网站outrika.com上设置YOURLS网址缩短器。该网站托管在Windows Azure上,我已成功为其设置自定义域。此外,我已将所有YOURL文件添加到其中并更新了user / config.php文件。链接正在我的管理面板中创建,因此数据库连接正常工作。但是当我打开一个短链接然后它将我重定向到主页(outrika.com)而不是实际的长链接。是否需要在yourls-loader.php中进行自定义。这是我的web.config文件的外观。

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <security>
            <requestFiltering allowDoubleEscaping="true" />
        </security>
        <rewrite>
            <rules>
                <rule name="YOURLS www" stopProcessing="true">
                    <match url="^(.*)$" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{HTTP_HOST}" pattern="^www\.outrika\.com$" />
                    </conditions>
                    <action type="Redirect" url="http://outrika.com/{R:1}" redirectType="Permanent" />
                </rule>
                <rule name="YOURLS" stopProcessing="true">
                    <match url="^(.*)$" ignoreCase="false" />
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="/yourls-loader.php" appendQueryString="true" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

0 个答案:

没有答案
相关问题