|
You are here: Home / How to install on IIS
How to install on IIS
Forum /
General /
How to install on IIS
Reply
Subscribe
Start new thread
Syndicated Feed (RSS)
|
Displaying 1 to 2 of 2
|
Previous
1
Next |
| Author |
Message |
kmiller
Posts: 10
Location:
|
1. Download and install http://www.isapirewrite.com/
2. Use this rule:
RewriteRule /index/(.*) /index.php\?sticky=$1 [I,O,U,L]
3. Change your 'index' file to 'index.php'
4. Open /saf/lib/CGI/CGI.php and change
if (strstr ($_SERVER['REQUEST_URI'], '?')) {
$uri = urldecode (substr ($_SERVER['REQUEST_URI'], 0, strpos ($_SERVER['REQUEST_URI'], '?')));
} else {
$uri = urldecode ($_SERVER['REQUEST_URI']);
}
to
if (strstr ($_SERVER['REQUEST_URI'], '?')) {
$uri = urldecode (substr ($_SERVER['REQUEST_URI'], 0, strpos ($_SERVER['REQUEST_URI'], '?')));
} else {
$_SERVER['REQUEST_URI'] = '/index/' . $_GET['sticky'];
$uri = urldecode ($_SERVER['REQUEST_URI']);
}
5. Drink a beer, pat yourself on the back and call the neighbors over to see how easily you hacked sitellite :)
Cao
Kevin
|
|
Back to top
|
View user profile
Contact this member
|
SiteGenesis
Posts: 8
Location: California, USA
|
Well the above didn't work out for me. No beer yet ;-)
So some of you may find this helpful if you are trying to install on IIs. I am using Win XP with IIs 5.1. This needs more extensive testing as I decided to drop IIs in favor of Apache 2 for a project I am working on and thought of this after my decision.
1. Get ISAPI Rewrite http://www.isapirewrite.com (they have a free lite version, I used version 2.8)
2. Use the following rules by editing the httpd.ini file located in c:\Program Files\Helicon\ISAPI_Rewrite folder (default installation)
RewriteRule /index/(.*)\?(.*)$ /index.php\?sticky=$1&$2 [I,U,L]
RewriteRule /index/(.*)$ /index.php\?sticky=$1 [I,O,U,L]
3. Stop and restart IIs so it reads the rules.
4. Rename the "index" file to "index.php" in the sitellite root folder. IIs seems to need the extension.
5. Edit the index.php file you just renamed and place
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];
at the top. ISAPI Rewrite adds the HTTP_X_REWRITE_URL server variable which happens to be the original url requested in the first place. The cgi object now parses the uri it was intended to.
Sitellite uses the $_SERVER['REQUEST_URI'] to set some other stuff up before the $cgi object gets ahold of it, so placing the above line inside the parseUri method may cause unexpected things to happen.
Maybe now you can have that beer!
PS I had trouble using "localhost" and being able to login to the admin (the php session wasn't getting set for some reason). Use "127.0.0.1" instead.
Rob
|
|
Back to top
|
View user profile
Contact this member
|
|

|