






International Sites:
|
|
Activation of Rewriting Rules
Now, since the templates generate the meta information for search engines and the articles and categories have been prepared for search engines, there is just a last trifle missing to register the website in search engines: the activation of the „rewriting rules“.
Many search engines only register HTML files with the file extension „.html“ or „.htm“. Normally this is very useful, since pages which are dynamically generated by CGI scripts often contain current, entertaining information. But the aim of a Content Management System is to generate the whole site with hundreds or thousands of pages dynamically from the data base. Internally the Portalsuite 2002 is based on the language PHP, you can recognise this within the software as well as on websites build with it. You can clearly see the file extension „.php“ in the URL input field of the browser, which prohibits the indexing of all web pages despite the deposited meta information in case of some search engines. Fortunately there is a solution for this difficulty. Therefore it is necessary to achieve that the web server does not reply with the standard error message „404 Error, Page not found“ to a request of a HTML page, but converts the URL request into the PHP variant before. Through this users - and consequently also search engines - can request a page with the file extension „.html“ and nevertheless receive a suggestive page. Hereto the Portalsuite has to co-operate with the web server very closely and not every web server is capable of dynamic conversion of URLs „on the fly“. In the following we exemplary refer to the most commonly used web server software „Apache“ which is available for many operating systems like Windows, Unix and Linux. A further difficulty may turn up if you do not have resp. operate your own web server, but host at a provider and consequently do not have the necessary clearances to access the configuration files. In this case you merely have to choice to either contact your hoster or to find yourself another hoster and to rent your web server there (which you can already get for a monthly fee of less than € 100 !). Besides you find a list of hosters on our website at http://www.portunity.de. The Apache web server is capable of converting URLs by the so-called rewriting rules. Rewriting rules are a set of rules and filter options with which URLs can be filtered and converted. We would like to adduce an apt quotation on rewriting rules here: ``The great thing about mod_rewrite is it gives you all the configurability and flexibility of Sendmail. The downside to mod_rewrite is that it gives you all the configurability and flexibility of Sendmail.'' -- Brian BehlendorfApache Group Rewriting rules are very intricate but also very flexible. But we have already defined the necessary rewriting rules for you. You merely have to ensure that the rewriting rule module is activated in the Apache server and add the following rule into the Apache configuration file resp. into the sector of your virtual server. Please note that each instruction has to be written in one line, also those which cause line breaks due to their length:
RewriteEngine On RewriteRule ^/index\.html$ /index.php RewriteRule ^/article([^-]*)-(.*)\.html$ /show-article.php? iArticleID=$1&iRubrikID=$2 RewriteRule ^/article([^-]*)_([^-]*)_(.*)\.html$ /show-article.php?iArticleID=$1&iRubrikID=$2&iTemplateID=$3 RewriteRule ^/article([^-]*)_(.*)\.html$ /show-article.php? iArticleID=$1&iTemplateID=$2 RewriteRule ^/article(.*)\.html$ /show-article.php?iArticleID=$1 RewriteRule ^/cat([^-]*)_(.*)\.html$ /index.php?iRubrikID=$1&iTemplateID=$2 RewriteRule ^/cat(.*)\.html$ /index.php?iRubrikID=$1 RewriteRule ^/index([^-]*)_(.*)\.html$ /index.php?i=$1&iTemplateID=$2 RewriteRule ^/index(.*)\.html$ /index.php?i=$1
We will not cater to the meaning and syntax of these rules and commands, since it would go beyond the scope. If you interested in this matter we recommend to take a look at the documentation of the Apache web server on the internet at http://www.apache.org, which is very elaborate The pages are available as virtual HTML files already after activation of the rewriting rules in the Apache server. But if click onto an article or menu item it is again linked onto the actual PHP version. This behaviour affects the indexing behaviour of search engines negatively, since most search engines visit and index also sub pages by means of the internal links automatically. But, if a link refers to PHP files, again search engines do not accept this link. For this reason there is a rewriting rule flag in the site parameters of the base setup, with which you can achieve that all internal links are set onto the HTML variant. If you set the rewriting rule flag, a click onto an article or menu item should be linking onto the HTML variant. If the rewriting rules on the server are not activated or do not work correctly, this leads to a corresponding error message that the page does not exist. From this it follows that you can activate the rewriting rules on the web server and that it does not matter if you activated the flag in the base setup, but on the other hand the website will not work anymore.
[Back] -
[Bookmark] -
[Optimized for Printing] - [Send by E-mail] - [Contact]
Copyright © 2000-2002 by Portunity GmbH (Germany) - All rights reserved.
|
|


Direct links to the new Portalsuite 2002:
- Productinfos
- Download
- Support overview
- Support forum
|