Ready to get started?Download WordPress


WordPress blog as sub-directory on IIS-hosted website (1 post)

  1. cirrus2001
    Posted 5 months ago #

    I'm trying to make my wordpress blog (hosted on to be accessible from other Windows/IIS/ASP.NET-application (currently http://localhost/). My goal is to access blog using url: http://localhost/blog/

    I've installed AAR and URL Rewrite and my web.config file is looking like this:

    <?xml version="1.0" encoding="UTF-8"?>
        <rule name="Route the requests for Blog" stopProcessing="true">
                    <match url="^blog/(.*)" />
                        <add input="{CACHE_URL}" pattern="^(https?)://" />
                    <action type="Rewrite" url="{C:1}://{R:1}" />
                        <set name="HTTP_ACCEPT_ENCODING" value="" />
                <rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1" stopProcessing="true">
                    <match filterByTags="A, Area, Base, Form, Frame, Head, IFrame, Img, Input, Link, Script" pattern="^http(s)?://*)" />
                    <action type="Rewrite" value="/blog/{R:2}" />
                <add input="{HTTP_HOST}" pattern="^$" />
        <rule name="RewriteRelativePaths" preCondition="ResponseIsHtml1">
                    <match filterByTags="A, Area, Base, Form, Frame, Head, IFrame, Img, Input, Link, Script" pattern="^/(.*)" negate="false" />
                    <action type="Rewrite" value="/blog/{R:1}" />
                    <preCondition name="ResponseIsHtml1">
                        <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />

    I can access blog using http://localhost/blog/ and all links work fine, but when I try to access WordPress admin http://localhost/blog/wp-admin I get 404.0 error (url: http://localhost/wp-login.php?redirect_to=http%3A%2F%2F192.168.0.79%2Fwp-admin%2F&reauth=1)

    I feel like this could be an authentication problem when AAR Reverse Proxy approach, but I'm not sure.


You must log in to post.

About this Topic