// -----------------------------------------------------------------------
// This file is part of AROUNDMe
// 
// Copyright (C) 2003-2008 Barnraiser
// http://www.barnraiser.org/
// info@barnraiser.org
// 
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program; see the file COPYING.txt.  If not, see
// <http://www.gnu.org/licenses/>
// -----------------------------------------------------------------------


>> Appendix A - VHosts and .htaccess
   The following assumes you have access to edit your Apache vhosts file
   which is typically held in /etc/apache2/sites-enabled/ (backup then
   edit 000-default).

   If instructed to add to a .htaccess file, then create a new file
   called .htaccess and move this into your /aroundme_pi/ directory. Then
   add the option that best suites you from below. Once complete restart
   Apache.



EXAMPLE 1 =========================================================
http://identity.domain.org
No redirect from http://domain.org or http://www.domain.org


#start of copy into 000-default ................
<VirtualHost *:80>
  ServerName my.domain.com
  DocumentRoot /var/www/path/to/aroundme_pi
    <Directory /var/www/path/to/aroundme_pi>
                Options FollowSymLinks MultiViews
                AllowOverride all
                Order allow,deny
                allow from all
    </Directory>
</VirtualHost>
#end of copy into 000-default ................


EXAMPLE 2 =========================================================
http://identity.domain.org
Redirection from http://domain.org or http://www.domain.org


#start of copy into 000-default ................
<VirtualHost *:80>
  ServerAlias domain.com
  ServerAlias www.domain.com 
  ServerName identity.domain.com
  DocumentRoot /var/www/path/to/aroundme_pi
    <Directory /var/www/path/to/aroundme_pi>
                Options FollowSymLinks MultiViews
                AllowOverride all
                Order allow,deny
                allow from all
    </Directory>
</VirtualHost>
#end of copy into 000-default ................


#start of copy into .htaccess ................
RewriteEngine On
RewriteCond %{HTTP_HOST} !^identity\.domain\.org$ [NC]
RewriteRule (.*) http://identity.domain.org/$1 [R=301,L]
#end of copy into .htaccess ................


EXAMPLE 3 =========================================================
http://domain.org/identity


#start of copy into 000-default ................
<VirtualHost *:80>
  ServerName domain.org
  DocumentRoot /var/www/path/to/aroundme_pi
    <Directory /var/www/path/to/aroundme_pi>
                Options FollowSymLinks MultiViews
                AllowOverride all
                Order allow,deny
                allow from all
    </Directory>
</VirtualHost>
#end of copy into 000-default ................


#start of copy into .htaccess ................
RewriteRule ^([^/\.]+)/?$ /index.php?$1 [L]
#end of copy into .htaccess ................

// DOCUMENT ENDS -------------------------------------------------------