From: Peder W. <ped...@gm...> - 2017-10-20 13:37:44
|
It turns out that IIS filters out url paths that include '+' symbols, for security reasons ( https://blogs.iis.net/thomad/iis7-rejecting-urls-containing). In the #ask inline query, there was a [[newsdate::+]] argument, if removing that argument it works. 2017-10-20 12:57 GMT+02:00 James HK <jam...@gm...>: > Hi, > > > results in a page with url .../Special:Ask/.... > > > > The wiki in installed on a Windwos Server 2016 (IIS 10). > > I'm convinced this relates to a `:` issue in IIS [0, 1]. Please create > an example at [2] so that we verify the behaviour against a non IIS > installation. > > [0] https://stackoverflow.com/questions/667429/using-a- > colon-in-a-url-with-asp-net-iis > [1] https://blogs.iis.net/nazim/use-of-special-characters- > like-in-an-iis-url > [2] https://sandbox.semantic-mediawiki.org > > Cheers > > On 10/20/17, Peder Wikström <ped...@gm...> wrote: > > I have problems with short url:s for semantic queries with type = rss. > > Short URL:s work fine on the wiki per se, but not this case when the > query > > results in a page with url .../Special:Ask/.... > > > > The wiki in installed on a Windwos Server 2016 (IIS 10). > > https://www.heurekaslu.se/wiki/Special:Version > > PHP version 7.1.9 > > MediaWiki 1.29.1 > > Semnatic verson: 2.5.4 > > > > Example: (you can find it on page > > https://www.heurekaslu.se/wiki/Category:Release) that generates the RSS > > page: > > > > English [[Image:Feed-icon.png]] > > {{#ask:[[Category:Release]] [[language::!sv]] [[newsdate::+]] > > |?newsdate= > > |sort=newsdate > > |order=desc > > |date=newsdate > > |format=feed > > |type=rss > > |searchlabel= RSS > > }} > > > > However, the page url generated results in "File not found": > > https://www.heurekaslu.se/wiki/Special:Ask/-5B- > 5BCategory:Release-5D-5D-20-5B-5BNewsdate::%2B-5D-5D-20- > 5B-5BLanguage::Sv-5D-5D/-3FNewsdate/mainlabel%3D/limit% > 3D50/order%3Ddesc/sort%3Dnewsdate/offset%3D0/format% > 3Dfeed/searchlabel%3D-20RSS/type%3Drss > > > > Changing to the explicit url works: > > https://www.heurekaslu.se/w/index.php?title=Special:Ask/- > 5B-5BCategory:Release-5D-5D-20-5B-5BNewsdate::%2B-5D-5D- > 20-5B-5BLanguage::Sv-5D-5D/-3FNewsdate/mainlabel%3D/limit% > 3D50/order%3Ddesc/sort%3Dnewsdate/offset%3D0/format% > 3Dfeed/searchlabel%3D-20RSS/type%3Drss > > > > So there is either something wrong with the rewrite instructions in > > web.config, or a problem with Semantic Mediawiki and short urls. I think > it > > is the latter, since the rewrite works for other pages. > > > > LocalSettings.php: > > > > $wgScriptPath = "/w"; > > $wgArticlePath = "/wiki/$1"; > > $wgUsePathInfo = true; > > ... > > $smwgNamespaceIndex = 114; > > enableSemantics('https://www.heurekaslu.se/wiki/', true); > > > > Rewrite in web.config: > > > > <rule name="wikiRule2" stopProcessing="true"> > > <match url="^wiki/(.*)$" /> > > <!-- Same problem wiht or without these conditions > > <conditions> > > <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> > > <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> > > </conditions> > > --> > > <action type="Rewrite" url="/w/index.php?title={UrlEncode:{R:1}}" > > logRewrittenUrl="true" /> > > </rule> > > <rule name="wikiRule3" stopProcessing="true"> > > <match url="^wiki/$" /> > > <action type="Rewrite" url="/w/index.php" logRewrittenUrl="true" /> > > </rule> > > ------------------------------------------------------------ > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Semediawiki-user mailing list > > Sem...@li... > > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > > > |