2005-12-29, 05:41 PM
If you can't get Archive mode to work with the Sambar Server..
Open ./archive/global.php
find the first instance of...
and replace it with...
Then the archive mode will work just fine...
This is because Sambar matches the first valid file found in the directory (./archive) requested in the requested URL. Because Sambar does not have mod_rewite you could create a fake one to use forum wide using this same method. Also Sambar cleans 'ORIG_PATH_INFO' so it is safe to use without worring about what it may contain!
So what I am saying is that you can create a fake mod_rewrite for your forum doing the same thing on all your forum pages
Like, instead of links being...
you can have them as
or showthread
can be
Then just add the simple handler in your global.php file to convert back to what the script should process!
Open ./archive/global.php
find the first instance of...
$endpart = substr(strrchr($_SERVER['PHP_SELF'], "/"), 1);
and replace it with...
$endpart = substr($_SERVER['ORIG_PATH_INFO'], 1);
Then the archive mode will work just fine...
$_SERVER['PHP_SELF']
will always = index.php, because it's the first valid file found in the URL
This is because Sambar matches the first valid file found in the directory (./archive) requested in the requested URL. Because Sambar does not have mod_rewite you could create a fake one to use forum wide using this same method. Also Sambar cleans 'ORIG_PATH_INFO' so it is safe to use without worring about what it may contain!
So what I am saying is that you can create a fake mod_rewrite for your forum doing the same thing on all your forum pages
Like, instead of links being...
http://www.site.com/forumdisplay.php?fid=2
you can have them as
http://www.site.com/forumdisplay.php/2
or showthread
http://www.site.com/showthread.php?tid=3
can be
http://www.site.com/showthread.php/3
Then just add the simple handler in your global.php file to convert back to what the script should process!