Tutorial: Going Live
Here’s a short list, what you should consider when going live …
Config Mode
Since access to the config mode means full access to all files on your webserver, you should deactivate config mode on your live system or (at least) turn in on only for maintaining purposes.
_config.inc.php:
define ("PT_CONFIGMODE",0);
So even, if someone knows your superuser accounts, he’ll not be able to access/change the code.
Backend access
Further more restrictive you can turn of the whole backend:
_config.inc.php:
define ("PT_BACKEND",0);
Sometimes you’ll will have Phenotype based applications with no necessary for content entry at all. But normally that’s of course not a proper solution…
Here some more practical approaches:
1. Move admin URL
Well quite simple, rename the folder and adjust the necessary settings in _config.inc.php
Example: /_phenotype/klh234/ instead of /_phenotype/admin/
_config.inc.php:
define ("ADMINPATH", BASEPATH ."htdocs/_phenotype/klh234/"); define ("ADMINURL", SERVERURL . "_phenotype/klh234/"); define ("ADMINFULLURL", SERVERFULLURL . "_phenotype/klh234/");
You also have to adjust the path to the configuration files of your richtext editor. This pathes are configured for your application in the application folder in the file preferences.xml:
<!-- possible values are tinyMCE or fckEditor --> <rtf_editor>fckEditor</rtf_editor> <!-- change this to use a config file you created custom, should in this case be in the docroot (htdocs) --> <rtf_editor_config_path>_phenotype/klh234/lib/fckeditor/conf_rtf/</rtf_editor_config_path> <!-- possible values are tinyMCE or fckEditor --> <code_editor>fckEditor</code_editor> <!-- change this to use a config file you created custom, should in this case be in the docroot (htdocs) --> <code_editor_config_path>_phenotype/klh234/lib/fckeditor/conf_code/</code_editor_config_path>
2. Map admin URL to a different subdomain
If you don’t like cryptic folders, just map a subdomain to the _phenotype/admin/ folder and change configuration as follows:
Example: phenotype.example.com instead of www.example.com/_phenotype/admin/
_config.inc.php:
define ("MEDIABASEURL", SERVERFULLURL . "media/"); define ("ADMINURL", "/"); define ("ADMINFULLURL", "http://phenotype.example.com/")
Compared to the first approach you have to adjust the path to all of your assets too, so that you can access them correctly from both subdomains.
You also have to adjust the path to the configuration files of your richtext editor. This pathes are configured for your application in the application folder in the file preferences.xml:
<!-- possible values are tinyMCE or fckEditor --> <rtf_editor>fckEditor</rtf_editor> <!-- change this to use a config file you created custom, should in this case be in the docroot (htdocs) --> <rtf_editor_config_path>lib/fckeditor/conf_rtf/</rtf_editor_config_path> <!-- possible values are tinyMCE or fckEditor --> <code_editor>fckEditor</code_editor> <!-- change this to use a config file you created custom, should in this case be in the docroot (htdocs) --> <code_editor_config_path>lib/fckeditor/conf_code/</code_editor_config_path>
Last but not least you have to restrict access to the (still existing) folder _phenotype/admin. You dou that, by putting a .htaccess file into the _phenotype folder:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/_phenotype/admin.*
RewriteRule ^(.*)$ http://www.example.com
Caching
When going live, you should always do a full check on cache configuration of your pages and includes. During development it’s often convenient to turn caching off, but you would give away much of Phenotype’s performance possibilites, if you go live with such settings.
You think Phenotype Wiki/Documentation could be better?
We too. Please contribute: Edit this page
Recent Blog Posts
- Finally Multibyte - Phenotype 3.0
- Phenotype 2.9 explained
- Integration of PHPIDS (PHP-Intrusion Detection System)
- New Release: Phenotype 2.8 Ready for Download
- Restart: New Phenotype Website Live
- Phenotype worth: 2 Million $
- New Feature: Automatic Image Version Creation
- Additional smartURL variable: smartPATH