HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/bin/iirf/ExampleIniFiles/DetectFilesAndDirectories.ini
# DetectFilesAndDirectories.ini
# 
# Shows how to use the "special patterns" for RewriteCond - 
# for detection of files and directories.
#
# remember to rename this file to IsapiRewrite4.ini ,
# or copy this content to a file named IsapiRewrite4.ini
# before using it!
#
# Thu, 13 Jul 2006  15:11
# 

RewriteLog  c:\temp\iirfLog.out
RewriteLogLevel 5

# ============================================
# This rule shows chaining of RewriteCond's.  
#
# The first RewriteCond checks the HTTP_URL.  if it ends in
# .foo, .htm, .php or .html, then it evaluates to TRUE.
#
# As per the description in the IIRF doc, successive RewriteCond
# statements are chained with a logical AND.
#
# Therefore, if the first RewriteCond evaluates to TRUE, then
# the 2nd will also be evaluated. The second statement tests
# whether the REWUEST_FILENAME is a file - actually in english
# the logical statement is "is the REQUEST_FILENAME NOT a file?" 
#
# And the 3rd RewriteCond asks "Is the REQUEST_FILENAME NOT a
# directory?" 
#
# In summary, then, the chain of RewriteCond directives
# evaluates to TRUE when, the URL includes the given suffix, and
# the REQUEST_FILENAME is neither a file nor a directory (file
# or directory does not exist). In that case, the RewriteRule is
# applied. 
#
# ============================================

RewriteCond %{HTTP_URL}             (/|\.foo|\.htm|\.php|\.html|/[^.]*)$   [I]
RewriteCond %{REQUEST_FILENAME}     !-f                                    
RewriteCond %{REQUEST_FILENAME}     !-d                                    
RewriteRule ^.*$                    /index.php                             [U,I,L]



# ============================================
# This one detects if the physical path of the app exists. 
# If not it redirects to default.aspx.
#
RewriteCond %{APPL_PHYSICAL_PATH}   !-d                                    
RewriteRule ^.*$                    /default.aspx                          [U,I,L]


# This 
RewriteCond %{HTTP_USER_AGENT}   !-d                                    
RewriteRule ^.*$                    /winisp/info.aspx                      [U,I,L]