Forum

StartFile option question

Fred
20 May 2015, 17:19
Hi Hugo,

What is the correct way of telling Hiawatha to read .php as well as .html?
I tried
StartFile = index.php, index.html

but that doesn't work

Hiawatha version:
Operating System:
Hugo Leisink
20 May 2015, 18:57
Hiawatha does not support that. You can change the StartFile as defined in hiawatha.conf via a .hiawatha file for a specific directory.
Mustafa Ramadhan
22 May 2015, 11:38
I am using like:
UrlToolkit {
ToolkitID = findindexfile
Match ^([^?]*)/(\?.*)?$ Rewrite $1/index.php$2 Continue
RequestURI isfile Return
Match ^([^?]*)/index\.php(\?.*)?$ Rewrite $1/index.html$2 Continue
RequestURI isfile Return
Match ^([^?]*)/index\.html(\?.*)?$ Rewrite $1/index.shtml$2 Continue
RequestURI isfile Return
Match ^([^?]*)/index\.shtml(\?.*)?$ Rewrite $1/index.htm$2 Continue
RequestURI isfile Return
Match ^([^?]*)/index\.htm(\?.*)?$ Rewrite $1/index.pl$2 Continue
RequestURI isfile Return
Match ^([^?]*)/index\.pl(\?.*)?$ Rewrite $1/index.py$2 Continue
RequestURI isfile Return
Match ^([^?]*)/index\.py(\?.*)?$ Rewrite $1/index.cgi$2 Continue
RequestURI isfile Return
Match ^([^?]*)/index\.cgi(\?.*)?$ Rewrite $1/index.rb$2 Continue
RequestURI isfile Return
Match ^([^?]*)/index\.rb(\?.*)?$ Rewrite $1/default.htm$2 Continue
RequestURI isfile Return
Match ^([^?]*)/default\.htm(\?.*)?$ Rewrite $1/Default.aspx$2 Continue
RequestURI isfile Return
Match ^([^?]*)/Default\.aspx(\?.*)?$ Rewrite $1/Default.asp$2 Continue
RequestURI isfile Return
Match ^([^?]*)/Default\.asp(\?.*)?$ Rewrite $1/$2 Continue
}

VirtualHost {
...
UseToolkit = findindexfile
...
}
Manny Perez
22 May 2015, 21:49
Hi Hugo,

I am always testing different web tools so I am wondering, can it be specified index file in an alias as below?
VirtualHost {
Hostname = www.example.com, *.example.com
WebsiteRoot = /usr/local/www/htdocs
....
StartFile = index.html
Alias = /test1:/usr/local/www/tool_1 # index page is php
Alias = /test2:/usr/local/www/tool_2 # index page is html
Alias = /test3:/usr/local/www/tool_3 # index page is php
TimeForCGI = 10
UseFastCGI = PHP5
...
}
Hugo Leisink
23 May 2015, 20:43
No, an alias works with directories. But you can use a .hiawatha file inside those directories.
This topic has been closed.