Subdomain
From GregariusWiki
If you want to run Gregarius as a subdomain, you must use this manual. So you are able to use for example http://rss.example.com/ instead of http://example.com/rss/.
[edit] Installation
At first you have to do the Installation. Copy the unzipped archive to a chosen freely folder on the root directory of your webspace.
[edit] Set Up the Subdomain
Now the subdomain must be configured by the .htaccess file, a file for configure the web server, which redirects for example all queries for http://example.com/rss/ to http://rss.example.com/. To do this, the following code should be adapted and copied as .htaccess into the root directory of your webspace:
RewriteEngine On
RewriteBase /
# Subdomain: rss.example.com
RewriteCond %{HTTP_HOST} rss.example.com$ [NC]
RewriteCond %{REQUEST_URI} !^/rss/
RewriteRule ^(.*)$ rss/$1 [L]
If you have already a .htaccess file in your folder, feel free to add this code to it.
[edit] Adjust getPath()
Now, you can visit your Gregarius installation with the subdomain. But if you click on a link you despite will get to a address like http://rss.example.com/rss/index.php because every link includes the directory rss in the beginning. The URL is generated by the function getPath() which is defined in until.php, line 630 (at least in release 0.5.4). This function returns the relative path of the install dir, e.g http://host.com/thing/ to "/thing/" and http://host.com/ to "/". So you have to look for function getPath() { and replace
function getPath() {
static $ret;
if ($ret === NULL) {
...
}
return $ret;
}
with the following code
function getPath() {
return "/";
}
After all you should be able to visit your Gregarius installation with the arranged subdomain. View User Manual for more help for Gregarius.

