Forum

Multiple StartFiles workaround

Stephen R. van den Berg
21 February 2011, 15:33
The following workaround will allow you to have an unlimited number of startfiles (in the sample code I specify index.html, index.php and index.htm). Having native multiple StartFiles support would make this a lot more efficient.

UrlToolkit {
ToolkitID = findindexfile
Match ^([^?]*)/(\?.*)?$ Rewrite $1/index.html$2 Continue
RequestURI isfile Return
Match ^([^?]*)/index\.html(\?.*)?$ Rewrite $1/index.php$2 Continue
RequestURI isfile Return
Match ^([^?]*)/index\.php(\?.*)?$ Rewrite $1/index.htm$2 Continue
RequestURI isfile Return
Match ^([^?]*)/index\.htm(\?.*)?$ Rewrite $1/$2 Continue
}

UrlToolkit {
ToolkitID = yourwebsite
RequestURI isfile Return
Match ^[^?]*/(\?.*)?$ Call findindexfile
}
This topic has been closed.