Пример файла .htaccess для InlifeCMS на стороннем хостинге
{literal}{/literal}# $Id: vhosts.tpl,v 1.33.2.26 2009/10/02 11:54:41 sergey Exp $ # ServerName www.intranet.vlesu.ru # ServerAlias intranet.vlesu.ru # ServerAlias intranet.vlesu.ru.vh.inlife.ru # DocumentRoot /home/www/your_hoster_path/intranet.vlesu/intranet.vlesu-1.0/html ErrorDocument 404 /404.html ErrorDocument 500 /500.html #ErrorLog /var/log/httpd/intranet.vlesu.ru-error.log #CustomLog /var/log/httpd/intranet.vlesu.ru-access.log common AddDefaultCharset none AddType application/x-httpd-php .php .htm DirectoryIndex index.htm php_value include_path /www/vlesu/www/lib:/www/vlesu/www/lib/contrib/PEAR:/www/vlesu/www/lib/contrib/smarty/libs:. php_flag display_errors on #php_flag log_errors on #php_value error_log /var/log/httpd/intranet.vlesu.ru-php.log # php_admin_flag allow_url_fopen off php_value allow_url_fopen off php_value register_globals off php_value allow_call_time_pass_reference off php_value session.name SID php_value session.save_path /www/vlesu/www/var/session php_value session.cookie_lifetime 604800 php_value session.use_trans_sid 0 # 10 days php_value session.cache_expire 0 php_value session.cache_limiter private_no_expire php_value magic_quotes_gpc off php_value magic_quotes_runtime off php_value magic_quotes_sybase off php_value post_max_size 50M php_value upload_max_filesize 50M #php_value max_execution_time 30 php_value auto_prepend_file /www/vlesu/www/lib/prepend.php php_value auto_append_file /www/vlesu/www/lib/append.php # require mod_env SetEnv DSM_ROOT_DIR /www/vlesu/www SetEnv DSM_CONFIG_DIR etc SetEnv DSM_CACHE_DIR var/cache # require mod_rewrite RewriteEngine on #RewriteLogLevel 0 #RewriteLog /var/log/httpd/intranet.vlesu.ru-rewrite.log RewriteOptions MaxRedirects=40 #legacy URL RewriteRule ^formhand.htm /mod/api/formcreator/send/index.htm&%{QUERY_STRING} [R=301,L] # OLD URLs RewriteRule ^vent_fasad.html /vent_fasad/index.htm?&%{QUERY_STRING} [R=301,L] RewriteRule ^catalog.html /catalog/index.htm?&%{QUERY_STRING} [R=301,L] RewriteRule ^catalog_pod_klyam.html /catalog/pod/pod_klyam/index.htm?&%{QUERY_STRING} [R=301,L] # fix broken links RewriteRule ^/(.*)/.htm http://www.intranet.vlesu.ru/$1/index.htm [R=301,L] RewriteCond %{HTTP_HOST} ^intranet.vlesu.ru$ RewriteRule /(.*) http://www.intranet.vlesu.ru/$1 [R=301,L] RewriteRule ^mod/files/(.*) /module_files/$1 [L] RewriteRule ^(mod/.*) /modhandle.htm?mod_path=/$1&%{QUERY_STRING} [L] RewriteRule ^/files/(fa/.*) /download.htm?path=$1 [L,T=application/x-httpd-php] RewriteRule ^/(add|access|keywords|edit|delete|print).htm /index.htm?%{QUERY_STRING} [L] RewriteRule ^images/pm/([0-9][0-9][0-9])([0-9][0-9][0-9])([0-9][0-9][0-9])(\.[^/]*)$ /images/pm/$1/$2/$3$4 [L] RewriteRule ^images/pm/(small[^/]*)/([0-9][0-9][0-9])([0-9][0-9][0-9])([0-9][0-9][0-9])(\.[^/]*)$ /images/pm/$1/$2/$3/$4$5 [L] RewriteRule ^(images/pm/[^/]*)$ /getpict.htm?path=/$1 [L,T=application/x-httpd-php] #RewriteRule ^(images|banner|files|js|css)/(.*) /$1/$2?%{QUERY_STRING} [L] #RewriteRule ^/forum/(.*) /forum/$1?%{QUERY_STRING} [L] RewriteRule ^/(htmlarea|jscalendar)/(.*) /js/contrib/$1/$2?%{QUERY_STRING} [L] RewriteRule ^([a-zA-Z_\.0-9]+.js)$ /js/core/$1?%{QUERY_STRING} [L] RewriteRule ^/([a-zA-Z_\.]+)$ /$1?%{QUERY_STRING} [L] RewriteRule ^/(.*)/(index.html)?$ http://www.intranet.vlesu.ru/$1/index.htm?%{QUERY_STRING} [R=301,L] RewriteRule ^/__popup/(images/.*) /popup.htm?path=$1&%{QUERY_STRING} [L] RewriteRule ^/__popup/(.*)/([a-z_A-Z\.0-9]+)$ /index.htm?path=$1&popup=on&%{QUERY_STRING} [L] RewriteCond %{REQUEST_FILENAME} !-f #применять RewriteRule, только если запрашиваемое имя файла не совпадает с именем какого-нибудь реального файла на сервере RewriteCond %{REQUEST_FILENAME} !-d #и не совпадает с именем какой-нибудь реальной директории RewriteRule ^(.*)/([-a-z_A-Z\.0-9]+)$ /index.htm?path=$1&%{QUERY_STRING} [L]