In IIS I want directory listing to be enabled when served from the test server. With the same web.config
I don't want directory listing to be enabled on the production server. Is this possible?
The same entire directory structure is mounted on both test and production servers.
My current web.config
looks like:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<location path=".">
<system.webServer>
<directoryBrowse enabled="false" />
</system.webServer>
</location>
<location path="this/directory/listing/should/only-show-on-test-server">
<directoryBrowse enabled="true" />
</system.webServer>
</location>