VirtualHost {
...
UseToolkit = silverstripe
}
UrlToolkit {
ToolkitID = silverstripe
Match (\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php) Return
RequestURI exists Return
Match ^(/silverstripe/.*)\?(.*) Rewrite $1&$2 Continue
Match ^/silverstripe/(.*) /silverstripe/sapphire/main.php?url=$1
}
UrlRewrite {
RewriteID = silverstripe
Match (\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php) Return
RequestURI exists Return
Match ^(/silverstripe/.*)\?(.*) Rewrite $1&$2
Match ^/silverstripe/(.*) Rewrite /silverstripe/sapphire/main.php?url=$1
}
VirtualHost {
Hostname = localhost
WebsiteRoot = /root/httpd/hiawatha/silverstripe
StartFile = index.php
FastCGI = PHP5
RewriteUrl = silverstripe
}
UrlRewrite {
RewriteID = phil
# Match ^/(.*?)(\?|$)(.*) Rewrite /sapphire/main.php?url=$1&$3
Match (?i)(/.*\.(jpe?g|JPE?G|png|PNG|css|CSS|js|JS|gif|GIF|php|PHP|x?html?|X?HTML?))(.*?)$ ^/(.*?)(\?|$)(.*) Rewrite /sapphire/main.php?url=$1&$3
}
VirtualHost {
Hostname = localhost
WebsiteRoot = /root/httpd/hiawatha/silverstripe
StartFile = index.php
FastCGI = PHP5
RewriteUrl = phil
}
UrlRewrite {
RewriteID = silverstripe
Match (\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php) Return
RequestURI exists Return
Match (.*)\?(.*) Rewrite $1&$2
Match ^/(.*) Rewrite /sapphire/main.php?url=$1
}
UrlToolkit {
ToolkitID = silverstripe
RequestURI isfile Return
Match (.*)\?(.*) Rewrite $1&$2 Continue
Match ^/(.*) Rewrite /sapphire/main.php?url=$1
}
VirtualHost {
Hostname = silverstripe-hostname
WebsiteRoot = /path/to/silverstripe
ExecuteCGI = yes
UseToolkit = silverstripe
TriggerOnCGIstatus = no
}
UrlRewrite {
RewriteID = silverstripe
RequestURI isfile Return
Match (.*)\?(.*) Rewrite $1&$2
Match ^/(.*) Rewrite /sapphire/main.php?url=$1
}
VirtualHost {
Hostname = localhost
WebsiteRoot = /root/httpd/hiawatha/silverstripe
ExecuteCGI = yes
FastCGI = PHP5
RewriteUrl = silverstripe
}
Hiawatha v6.7, cache, IPv6, SSL, URL rewrite
# wigwam -c /etc/hiawatha/ -r [silverstripe] http://localhost/silverstripe/home
Reading httpd.conf
RewriteID '[silverstripe]' not found.
# wigwam -c /etc/hiawatha/ -r silverstripe http://localhost/silverstripe/home
Reading httpd.conf
RewriteID 'http://localhost/silverstripe/home' not found.
# wigwam -c /etc/hiawatha/ -r silverstripe
Reading httpd.conf
===[ URL rewrite tester
Use empty input to leave the program.
url: http://localhost/silverstripe/home
Bad URL: missing leading slash.
old: http://localhost/silverstripe/home
# wigwam -r silverstripe
Reading httpd.conf
===[ URL rewrite tester
Use empty input to leave the program.
url: /home
new: /sapphire/main.php?url=home
UrlToolkit {
ToolkitID = silverstripe
RequestURI isfile Return
Match (.*)\?(.*) Rewrite $1&$2 Continue
Match ^/(.*) Rewrite /sapphire/main.php?url=$1
}
http://localhost/silverstripe/InstallerTest/testrewrite
Warning: file_get_contents(http://localhost/silverstripe/InstallerTest/testrewrite) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found in /root/httpd/hiawatha/silverstripe/rewritetest.php on line 50
http://localhost/silverstripe/InstallerTest/testrewrite
Warning: file_get_contents(http://localhost/silverstripe/InstallerTest/testrewrite) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found in /root/httpd/hiawatha/silverstripe/rewritetest.php on line 50
mod_rewrite doesn't appear to be working. Make sure:
* mod_rewrite is enabled in your httpd.conf
* AllowOverride is enabled for the current path.
Please check these options, then refresh this page.If you believe that your configuration is correct, click here to proceed anyway.
# wigwam -c /etc/hiawatha -t silverstripe
Reading httpd.conf
===[ URL toolkit tester
Use empty input to leave the program.
url: home
Bad URL: missing leading slash.
old: home
url: /home
new: /sapphire/main.php?url=home
url: /localhost/silverstripe/home
new: /sapphire/main.php?url=localhost/silverstripe/home
Match (.*)silverstripe/(.*) Rewrite $1silverstripe/sapphire/main.php?url=$2
# wigwam -c /etc/hiawatha -t silverstripe
Reading httpd.conf
===[ URL toolkit tester
Use empty input to leave the program.
url: /localhost/silverstripe/home
new: /localhost/silverstripe/sapphire/main.php?url=home
VirtualHost {
Hostname = localhost
WebsiteRoot = /root/httpd/hiawatha
StartFile = index.php
FastCGI = PHP5
}
VirtualHost {
Hostname = localhost
WebsiteRoot = /root/httpd/hiawatha/silverstripe
FastCGI = PHP5
UseToolkit = silverstripe
}
ExecuteCGI = yes
TriggerOnCGIstatus = no
ExecuteCGI = yes
TriggerOnCGIstatus = no
CGIhandler = /usr/bin/php5-cgi:php
UrlToolkit {
ToolkitID = silverstripe
RequestURI isfile Return
Match (.*)\?(.*) Rewrite $1&$2 Continue
Match ^/(.*) Rewrite /sapphire/main.php?url=$1
}
VirtualHost {
Hostname = silverstripe.lan
WebsiteRoot = /home/websites/lan/silverstripe
ExecuteCGI = yes
UseToolkit = silverstripe
TriggerOnCGIstatus = no
}
UrlToolkit {
ToolkitID = silverstripe
RequestURI isfile Return
Match (.*)\?(.*) Rewrite $1&$2 Continue
Match ^/(.*) Rewrite /sapphire/main.php?url=$1
}
VirtualHost {
Hostname = localhost
WebsiteRoot = /root/httpd/hiawatha/silverstripe
ExecuteCGI = yes
UseToolkit = silverstripe
TriggerOnCGIstatus = no
}
Warning: file_get_contents(http://localhost/silverstripe/InstallerTest/testrewrite) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found in /root/httpd/hiawatha/silverstripe/rewritetest.php on line 47
Warning: file_get_contents(http://localhost/silverstripe/InstallerTest/testrewrite) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found in /root/httpd/hiawatha/silverstripe/rewritetest.php on line 47
mod_rewrite doesn't appear to be working. Make sure:
* mod_rewrite is enabled in your httpd.conf
* AllowOverride is enabled for the current path.
Please check these options, then refresh this page.If you believe that your configuration is correct, click here to proceed anyway.
VirtualHost {
Hostname = localhost
WebsiteRoot = /root/httpd/hiawatha
StartFile = index.php
UseToolkit = silverstripe
FastCGI = PHP5
}
VirtualHost {
Hostname = localhost
WebsiteRoot = /root/httpd/hiawatha/silverstripe
ExecuteCGI = yes
UseToolkit = silverstripe
TriggerOnCGIstatus = no
}
UrlToolkit {
ToolkitID = silverstripe
RequestURI isfile Return
Match (.*)\?(.*) Rewrite $1&$2 Continue
Match ^/silverstripe/(.*) Rewrite /silverstripe/sapphire/main.php?url=$1
}
127.0.0.1 localhost silverstripe
VirtualHost {
Hostname = localhost
WebsiteRoot = /root/httpd/hiawatha
StartFile = index.php
FastCGI = PHP5
}
VirtualHost {
Hostname = silverstripe
WebsiteRoot = /root/httpd/hiawatha/silverstripe
ExecuteCGI = yes
UseToolkit = silverstripe
TriggerOnCGIstatus = no
}