WordPress.org

Ready to get started?Download WordPress

Forums

web.config for permalinks when two sites are running in different directories (1 post)

  1. myersbr2
    Member
    Posted 8 months ago #

    I have two separate installs of WP 3.5.2 on a Windows 2008 server (sure wish it were Linux). Both sites work, and on the primary site, pretty permalinks works. The web.config of the primary site (http://www.strongwell.com) is as follows:

    '<configuration>
    <system.webServer>
    <rewrite>
    <rules>
    <rule name="wordpress" enabled="true" patternSyntax="Wildcard">
    <match url="*" />
    <conditions>
    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    </conditions>
    <action type="Rewrite" url="index.php/{R:0}" />
    </rule>
    </rules>
    </rewrite>
    <staticContent>
    <remove fileExtension=".eot" />
    <mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
    <remove fileExtension=".ttf" />
    <mimeMap fileExtension=".ttf" mimeType="font/ttf" />
    <remove fileExtension=".otf" />
    <mimeMap fileExtension=".otf" mimeType="font/otf" />
    <remove fileExtension=".woff" />
    <mimeMap fileExtension=".woff" mimeType="font/x-woff" />
    <remove fileExtension=".pdf" />
    <mimeMap fileExtension=".pdf" mimeType="application/pdf" />
    <mimeMap fileExtension=".mp4" mimeType="video/mpeg" />
    </staticContent>
    <tracing>
    <traceFailedRequests>
    <add path="*">
    <traceAreas>
    <add provider="ASPNET" areas="Infrastructure,Module,Page,AppServices" verbosity="Verbose" />
    <add provider="WWW Server" areas="Rewrite" verbosity="Verbose" />
    </traceAreas>
    <failureDefinitions timeTaken="00:00:03" />
    </add>
    </traceFailedRequests>
    </tracing>
    <security>
    <requestFiltering>
    <requestLimits maxAllowedContentLength="10000000" />
    </requestFiltering>
    </security>
    </system.webServer>
    </configuration>'

    The other site is in a subdirectory of the main site called "(http://www.strongwell.com/trainingnew) and it works fine but I cannot get pretty permalinks to work. I've tried NUMEROUS web.config options, but don't know if I'm supposed to put a new web.config in that folder or add to the existing one here. Ideally, I want the configuration to be http://www.strongwell.com/trainingnew/%postname%/

Reply

You must log in to post.

About this Topic