HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
web.config no longer working with Vanilla 2021.009 on fresh install, via IIS10
selfaware
New
Hi,
Installed Vanilla 2021.0009, however am unable create discussions and noticed that the included discussions lost their formatting - I'm pretty sure it's a web.config issue. Everything else, seems to work!
I used the following with Vanilla 3.3 and had no issues:
2021.009 is operating in my root director and can be viewed at www.badpolicy.com
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <clear /> <rule name="Vanilla Rule 1" stopProcessing="true"> <match url="^(.*)$" ignoreCase="false" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> </conditions> <action type="Rewrite" url="index.php\?p={R:1}" appendQueryString="true" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
When I click on new discussion, vanilla redirects to the
following url:
http://www.badpolicy.com/index.php?p=/post/discussion
and I get: Something has gone wrong.
0
Comments
I have edited your post to add code-block around the config
Have you enabled pretty urls in config.php aswell?
Enabling pretty urls to get that
index.php?p=
awayhttps://open.vanillaforums.com/discussion/comment/220157/#Comment_220157
https://open.vanillaforums.com/discussion/27568/enabling-clean-urls-on-iis-installations#latest
It think ppl some deeper understanding on this will ask for content of your htaccess and debug info https://open.vanillaforums.com/discussion/comment/219008/#Comment_219008 in order to help
Thanks, I'll make sure to use code block in the future.
I added:
$Configuration['Garden']['RewriteUrls'] = TRUE;
under the garden header, but no dice.
Hopefully, there are some IIS experts out there, schooled in web.config syntax.
I was thinking, since Vanilla asks if you are using htaccess or not, if you answer, "no" perhaps it could auto generate a web.config file, similar to what wordpress does.
Update:
I notice if I turn off the Rich editor, all problems disappear?
However, with the Rich editor on, I get the following errors:
Fatal Error in Smarty_Security._checkDir();
Smarty Security: not trusted file path 'D:\www\badpolicy.com\plugins\rich-editor\views\rich-editor.tpl'
The error occurred on or near: D:\www\badpolicy.com\vendor\smarty\smarty\libs\sysplugins\smarty_security.php
Backtrace:
Rich editor require pretty URLs.