Hi,
I'm having an PHP application running on IIS7. I want to secure
particular folder by modifying web.config. I don't want to use tag in
config as this will redirect users to login page. Rather then, I'd like
to implement HttpNotFoundHandler.
Say for example, http://domain.com/SecureFolder
is the directory on which I want to implement HttpNotFoundHandler. When
user try to access that folder, the 404 page should be displayed.
The secured folder can only be accessed via sub domain. Below is the
config file which I'm trying to do the needful but that is not working. The IIS is having UrlRewrite module installed.
<?xml version="1.0"?>
<configuration>
<connectionStrings />
<appSettings />
<system.web>
<customErrors mode="RemoteOnly"></customErrors>
<httpHandlers>
<add path="~/securefolder" verb="*" type="System.Web.HttpNotFoundHandler" validate="true"/>
</httpHandlers>
</system.web>
</configuration>
Any help would be greatly appreciated.
Thanks in advance,
Entry