Hiawatha version: 8.6
Operating System: Windows 7 x64 Professional
Good day,
I'm trying out Hiawatha (on Windows, as it's what I use for development) and I've run into a bit of an issue when trying to use e. g.
http://localhost/index.php/id=1
instead of
http://localhost/index.php?id=1
If I use
index.php/id=1
, I get a 404 error. It looks like Hiawatha is looking for a directory in this case.
Is there a way to work around this? I've tried a rewrite, but it seems rewrite toolkits (along with the ShowIndex directive) are ignored for the default website. When I had a toolking rewrite index.php/id=1 to index.php?id=1 (rewrite rules should have worked, as they seemed to work with wigwam), I still got a 404.
Here's my hiawatha.conf:
# Hiawatha main configuration file
#
# GENERAL SETTINGS
#
#ServerId = www-data
ConnectionsTotal = 150
ConnectionsPerIP = 10
SystemLogfile = D:\programy\apps\web_servers\hiawatha\log\system.log
GarbageLogfile = D:\programy\apps\web_servers\hiawatha\log\garbage.log
## Cache and compression settings
CacheSize = 15
UseGZfile = yes
## Security settings
## PreventCSRF = yes
## PreventXSS = yes
# BINDING SETTINGS
# A binding is where a client can connect to.
#
Binding {
Port = 80
Interface = 127.0.0.1
MaxKeepAlive = 30
TimeForRequest = 3,20
}
#
#Binding {
# Port = 443
# Interface = ::1
# MaxKeepAlive = 30
# TimeForRequest = 3,20
# SSLcertFile = D:\programy\apps\web_servers\hiawatha\config\hiawatha.pem
#}
# BANNING SETTINGS
# Deny service to clients who misbehave.
#
#BanOnGarbage = 300
#BanOnMaxPerIP = 60
#BanOnMaxReqSize = 300
#KickOnBan = yes
#RebanDuringBan = yes
# COMMON GATEWAY INTERFACE (CGI) SETTINGS
# These settings can be used to run CGI applications. Use the 'php-fcgi'
# tool to start PHP as a FastCGI daemon.
#
#CGIhandler = D:\programy\apps\interpreters\php_5.4\php-cgi.exe:php
#CGIhandler = D:\programy\apps\web_servers\hiawatha\bin\ssi-cgi.exe:shtml
#CGIextension = php
#
FastCGIserver {
FastCGIid = PHP5
ConnectTo = 127.0.0.1:9000
Extension = php
}
# URL TOOLKIT
# This URL toolkit rule was made for the Banshee PHP framework, which
# can be downloaded from http://www.hiawatha-webserver.org/banshee
#
UrlToolkit {
ToolkitID = slapo
Match /(.*\.php)(.*) Rewrite /$1$2
Match /(\?|main/)(.*) Rewrite /index.php?$2
RequestURI exists Return
}
UrlToolkit {
ToolkitID = yii
RequestURI exists Return
Match /.* Rewrite /index.php
}
# DEFAULT WEBSITE
# It is wise to use your IP address as the hostname of the default website
# and give it a blank webpage. By doing so, automated webscanners won't find
# your possible vulnerable website.
#
Hostname = 127.0.0.1, localhost
WebsiteRoot = F:/dokumenty/weby
StartFile = index.html
AccessLogfile = D:\programy\apps\web_servers\hiawatha\log\access.log
ErrorLogfile = D:\programy\apps\web_servers\hiawatha\log\error.log
ShowIndex = no
MaxRequestSize = 32768
MaxUploadSize = 32
TimeForCGI = 10
UseFastCGI = PHP5
UseToolkit = slapo
NoExtensionAs = php
Thanks in advance.