Configuring Stealth Mode
From phpCMS
Contents |
[edit] Configuring the phpCMS Stealth Mode
To use the so-called phpCMS Stealth-Mode, the server needs two things: First, usage of the file called .htaccess has to be allowed. The other is the Apache module mod_action which has to be enabled. These mode should also be functional with the Microsoft IIS, but we didn't get this configuration working yet. Some hints about the IIS can be found in the FAQ-section (english).
phpCMS Stealth-Mode lets dynamically generated phpCMS files look like any normal HTML file. Search engines and proxies mostly save only those files, which don't contain a question mark (?) within the URL. Without Stealth-Mode a file call would look like this: http://phpcms.de/parser/parser.php?file=/demo/index.htm. With activated Stealth-Mode the same page can be called like this: http://phpcms.de/demo/index.htm. In Stealth Mode also the first called syntax is functional. The following text explains how to enable Stealth Mode.
[edit] The .htaccess File
In the above mentioned .htaccess file a file extension can be set that is then automatically linked with phpCMS. Every file with this extension requested by the browser will be passed through the phpCMS parser. The parser processes this file and passes it to the browser. A .htaccess files affects the actual directory and each directory below. Therefore the file extension should be chosen carefully. Files, which already contain a <html> won't be processed by the parser. So normally there wouldn't be any problems with existing HTML-files. This also makes it possible to set the extension .htm for example. The content in the .htaccess files is nearly the same for every system. Just the path (from the document root) has to be set correctly:
AddType application/x-httpd-parse .htm Action application/x-httpd-parse "/parser/parser.php?file="
A good place for this file is the document root. If the file extension is changed from .htm to .cms for example, also the entry $this->PAGE_EXTENSION in the file /parser/include/default.php has to be changed to the according file extension -- in this case .cms.
[edit] Enabling Stealth in the GUI
Additionally to the .htaccess file the Stealth Mode has to be enabled in the phpCMS GUI:
File-Stealth-Mode: on Secure Stealth-Mode: on
This can also be done directly by editing the file default.php.
[edit] Further Possibilities
Beside the usage of mod_action with the Apache webserver there are also further possibilities to use the Stealth Mode. The sample .htaccess file which is delivered with the phpCMS package shows several options. The relevant lines only have to be un-commented (and possibly the paths have to be adapted). An example for using mod_rewrite can be found in the FAQ section.
Main Page: User Documentation MainPage
« Previous Page: Set the permissions | Top Page: Installation and configuration | Next Page: A first test of phpCMS »

