Friendly URLs attempt to mask the fact that your content is being served up by an application by rewriting the URL that Visitors see in their URL bar. For example, a page with the URL "http://example.com/some-friendly-page
" is more friendly than a page with the URL "http://example.com/index.php?cID=some-unfriendly-id
".
Friendly URLs are not only more likely to be indexed by a search engine, they are more likely to be remembered by a human.
With Zenario you can set an alphanumeric alias for every page on your site, for example:
http://example.com/index.php?cID=my_page
If you use friendly URLs, this could be written with a .html
suffix:
http://example.com/my_page.html
or with no suffix:
http://example.com/my_page
mod_rewrite
FunctionalityFriendly URLs require mod_rewrite
functionality.
The CMS will install and run without friendly URLs mod_rewrite
, but if your server supports mod_rewrite
then we recommend using it.
To enable mod_rewrite
features, you should first check that mod_rewrite
is enabled in your Apache web server installation. You can then enable friendly URLs as follows:
.htaccess
fileIn the download, you should find a file named .htaccess
. Provided Apache is configured to read directives from .htaccess
files in your web directory, you can just use it as it is.
(If you are using a Windows server you may not be able to rename the file using Windows Explorer. However you can work around this limitation by opening it with a text-editor and saving it with a different name.)
To enable the friendly URLs you will also need to enable them in the CMS by changing the mod_rewrite_enabled
and mod_rewrite_suffix
site settings.
To do this go to Organizer > Configuration > Site settings > URLs and click "Properties"
An admin box will open where you can choose to use mod_rewrite as well as choose the suffix that goes onto the end of the URL (.htm or .html).
Click "Save" to save the settings you have just chosen.
There is a setting in Apache that controls whether the .htaccess files are enabled. That is usually done in either a global apache.conf file, or in a virtual host file. For example:
<VirtualHost *:80>
ServerName yoursite.tribalsystems.uk
ServerAdmin you@yourdomain.com
DocumentRoot /var/www/clients/yoursite/public_html
<Directory /var/www/clients/yoursite/public_html/>
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
Note that the line AllowOverride All is important. If it is set to "None", Apachewill not read your .htaccess files.