===========================================================
 Install on ScriptAlias Environment

 Hidekazu Kubota
 2008-01-24 document for version 0.6
===========================================================

PositLog does not officially support the server that uses ScriptAlias. 
Using ScriptAlias means, in other words, .cgi directory and .html 
directory must be different. Some functions are not available on such server. 

- CSS of Plug-ins (cocolog, HatenaDiary, HatenaAntenna, RSSlayouter 
 in Standard Plug-ins) is not available by default. 
 You need to rewrite the path of the CSS files.
- Edit more settings in PositLogConfig.pm
- Directory Structure of PositLog becomes complex.


Refer to the following sample, put files, and edit PositLogConfig.pm.
The example presumes CGI files are under /xxx/cgi-bin/ and accessed by 
the URL http://xxx.com/cgi-bin/.
It also presumes files except CGI are under /xxx/htdocs/ and accessed by
the URL http://xxx.com/

== SAMPLE == 
( /* means all files under the directory.)

/xxx/htdocs/
 |- admintools/
 |   |- logoadmin.jpg
 |   |- css/*
 |
 |- pages/ (777)
 |- bgimages/ (777)
 |- system/*

/xxx/cgi-bin/
 |- admindata/ (777)
 |
 |- admintpools/
 |   |- admin.cgi
 |   |- adminnavi.cgi
 |   |- admintop.cgi
 |   |- pagemanager.cgi
 |   |- pageproperty.cgi
 |   |- positlogadmin.cgi
 |   |- usermanager.cgi
 |   |- userproperty.cgi
 |
 |- exlib/*
 |- lang/*
 |- PositLogPlugin/*
 |
 |- system/fckeditor/editor/filemanager/connectors/perl (777)
 |- system/fckeditor/editor/filemanager/connectors/perl/*
 |
 |- clearCache.cgii755j
 |- createadmin.cgii755j
 |- createPage.cgii755j
 |- deleteSprite.cgii755j
 |- fileloader.cgii755j
 |- fileupload.cgii755j
 |- groupSprite.cgii755j
 |- pagerss.cgii755j
 |- positlog.cgii755j
 |- PositLogAuth.pmi644j
 |- PositLogConfig.pmi644j
 |- PositLogLink.pmi644j
 |- PositLogParam.pmi644j
 |- PositLogSprites.pmi644j
 |- recentcontents.cgii755j
 |- saveSprite.cgii755j
 |- saveStyles.cgii755j
 |- tag.cgii755j
 |- ungroupSprite.cgii755j
 |- unlockPassword.cgii755j


----------------------------------------

In the case above, set PositLogConfig.pm as follows:
-------------------------------------------
my $rooturl = "http://xxx.com/cgi-bin/";

$datapath = "../htdocs/pages/";

$systempath = "/system/";
(This is the URL from the Site Root (/), which matches /xxx/htdocs/system/)

$admintoolscgipath = "/cgi-bin/admintools/";
(This is the URL from the Site Root (/), which matches /xxx/htdocs/admintools/)

$admintoolsfilepath = "../admintools/";
(This is the tricky relative URL, which indicates http://xxx.com/admintools/ 
 from both http://xxx.com/cgi-bin/ and http://xxx.com/)

$dataurl = "/pages/";
(This is the URL from the Site Root (/), which matches /xxx/htdocs/pages/)

$fckuploadurl = "/pages/";
(This is the URL from the Site Root (/), which matches /xxx/htdocs/pages/)

$fckconnector = "/cgi-bin/system/fckeditor/editor/filemanager/connectors/perl/connector.cgi";
(This is the URL from the Site Root (/), which matches connector.cgi)

$fckuploader = "/cgi-bin/system/fckeditor/editor/filemanager/connectors/perl/upload.cgi";
(This is the URL from the Site Root (/), which matches upload.cgi)

-------------------------------------------

If you set $mod_rewrite = 1, change .htaccess as follows.
(This exapmle is available only if the setting is the same above.)

.htaccess just under /xxx/cgi-bin/
=======================
DirectoryIndex positlog.cgi
 
AddHandler cgi-script .cgi .pm .dat .spr 
 
RewriteEngine on
RewriteRule tag/(.*)$ /cgi-bin/tag.cgi?tag=$1 [L]
RewriteRule tag/$ /cgi-bin/tag.cgi [L]
RewriteRule index.html$ positlog.cgi [L]
RewriteRule (p?g?[0-9]{6}[a-zA-Z]{2})\.html$ /cgi-bin/positlog.cgi?load=$1 [QSA,L]
=======================

.htaccess just under /xxx/htdocs/
=======================
DirectoryIndex /cgi-bin/positlog.cgi
 
AddHandler cgi-script .cgi .pm .dat .spr 
 
RewriteEngine on
RewriteRule ^positlog.cgi /cgi-bin/positlog.cgi [L]
RewriteRule tag/(.*)$ /cgi-bin/tag.cgi?tag=$1 [L]
RewriteRule tag/$ /cgi-bin/tag.cgi [L]
RewriteRule index.html$ /cgi-bin/positlog.cgi [L]
RewriteRule (p?g?[0-9]{6}[a-zA-Z]{2})\.html$ /cgi-bin/positlog.cgi?load=$1 [QSA,L]
=======================

