Manual talk:Short URL/wiki/Page title -- Windows with IIS7--root access

From mediawiki.org
Latest comment: 12 years ago by Itanex

I took the time to run through many settings with the previous rule, which hijack all requests because its not specific enough. After running through all the chaos that IIS and URL Rewrite cause I found a simple solution that I have working. If there are any issues I would love to know about them so I can better handle these myself as well as being able to provide the best details.

I am running Windows 7 Enterprise Edition with IIS7.5. These should all work on IIS7.0.

Itanex 01:11, 10 January 2012 (UTC)Reply

Short url:s working except for semantic queries[edit]

I am using IIS10, MediaWiki 1.29.1, and Semantic MediaWiki. ShortURL:s works, excepts for Semantic queries. For example, this page works fine:

https://www.heurekaslu.se/wiki/Category:Release. On the same page there is a semantic query (press RSS-icon) that should result in an RSS-page, but it does not work (404 File not found).

If I insert "index.php?title=" in front of "Special" in https://www.heurekaslu.se/wiki/Special:Ask/-5B.... then it works.

This is the web.config-file rewrite instructions: <system.webServer>

       <rewrite>
           <rules>
               <remove name="omdirigera startsida" />
               <rule name="Redirect User Friendly URL" enabled="true" stopProcessing="true">
                   <match url="^wiki/index\.php$" />
                   <conditions>
                       <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
                       <add input="{QUERY_STRING}" pattern="^title=([^=&]+)$" />
                   </conditions>
                   <action type="Redirect" url="{C:1}" appendQueryString="false" />
               </rule>
               <rule name="MediaWiki" enabled="true" stopProcessing="true">
                   <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?title={R:1}" />
               </rule>
           </rules>
           <outboundRules>
               <rule name="Outbound Rewrite User Friendly URL" preCondition="ResponseIsHtml1" enabled="true">
                   <match filterByTags="A, Form, Img" pattern="^(.*/)wiki/index\.php\?title=([^=&]+)$" />
                   <action type="Rewrite" value="{R:1}{R:2}/" />
               </rule>
               <preConditions>
                   <preCondition name="ResponseIsHtml1">
                       <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
                   </preCondition>
               </preConditions>
           </outboundRules>			
       </rewrite>