Configuring Alias module

This is guide for configuring your Saurus CMS Alias module.

NB! Current guide is for version 4.3.0 and later, for older versions please refer to InstallationGuide4.2.0  or  InstallationGuide3.3.4

  1. Install Apache URL Rewrite Engine module (mod_rewrite), see: http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html

  2. Open the Apache configuration file and add following lines to your virtual host configuration:

Options +SymLinksIfOwnermatch
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !^/admin
RewriteCond %{REQUEST_FILENAME} !^/classes
RewriteCond %{REQUEST_FILENAME} !^/editor
RewriteCond %{REQUEST_FILENAME} !^/extensions
RewriteCond %{REQUEST_FILENAME} !^/idcard
RewriteCond %{REQUEST_FILENAME} !^/js
RewriteCond %{REQUEST_FILENAME} !^/public
RewriteCond %{REQUEST_FILENAME} !^/px
RewriteCond %{REQUEST_FILENAME} !^/px_custom
RewriteCond %{REQUEST_FILENAME} !^/shared
RewriteCond %{REQUEST_FILENAME} !^/styles
RewriteRule ^/(.*) /map.php?mod_rewrite=/&cmd=$1 [L,PT,QSA]

# RewriteLogLevel 0 will disable logging, we suggest set it to 2
# for debugging problems
RewriteLogLevel 0

# set correct log file path here, we suggest set it only when debugging problems:
# RewriteLog /var/log/httpd/rewrite.log

NB! This block must be placed outside of <Directory> directives block.
 

NB!
In case you have any additional directories or files under your website root directory, which are not part of the CMS installation, you should exclude them in the alias configuration. Add following lines for each directory or file:


RewriteCond  %{REQUEST_FILENAME} !^/notcmsdir


We suggest to keep the logging level at "0" on the production/live sites, because of remarkable space usge. Set RewriteLogLevel to "2" when developing the new site and debugging aliases.

 

Using subfolder


If your website is located in the subfolder, eg http://www.yoursite.com/mysite/ then the subfolder name must be added to the rewrite conditions:
 Options +SymLinksIfOwnermatch
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} ^/mysite
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !^/mysite/admin
RewriteCond %{REQUEST_FILENAME} !^/mysite/classes
RewriteCond %{REQUEST_FILENAME} !^/mysite/editor
RewriteCond %{REQUEST_FILENAME} !^/mysite/extensions
RewriteCond %{REQUEST_FILENAME} !^/mysite/idcard
RewriteCond %{REQUEST_FILENAME} !^/mysite/js
RewriteCond %{REQUEST_FILENAME} !^/mysite/public
RewriteCond %{REQUEST_FILENAME} !^/mysite/px
RewriteCond %{REQUEST_FILENAME} !^/mysite/px_custom
RewriteCond %{REQUEST_FILENAME} !^/mysite/shared
RewriteCond %{REQUEST_FILENAME} !^/mysite/styles
RewriteRule ^/(.*)   /mysite/map.php?mod_rewrite=/mysite/&cmd=$1 [L,PT,QSA]

# RewriteLogLevel 0 will disable logging, we suggest set it to 2
# for debugging problems
RewriteLogLevel 0

# set correct log file path here, we suggest set it only when debugging problems:
# RewriteLog /var/log/httpd/rewrite.log

Installation

System requirements / Linux installation (using shell) / Installation using FTP / Windows installation / Windows installation with a previously installed web server / Required PHP settings / Required .htaccess directives / Installation troubleshooting / Configuring Alias module / Configuring Alias module using .htaccess directives / Version upgrade in Linux (using shell) / Version upgrade using FTP / Version upgrade in Windows / How to copy your Saurus CMS website