Options +MultiViews +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
# Disallow access to .svn directories
RewriteCond %{SCRIPT_FILENAME} /\.svn/
RewriteRule . - [F,L]
# ErrorDocument 403 "Web access to Subversion metadata is not permitted"
# Routing rewrites:
# /users/username/ -> user_blog.php?login=username
# RewriteRule ^users/([^/]+)/?$ user_blog.php?login=$1 [QSA]
# /pages/title/ -> pages.php?caption=title
# RewriteRule ^links/([^/]+)/?$ pages.php?caption=$1
# RewriteRule ^Celebrity/([^/]+)/?$ celebrity.php?name=$1 [QSA]
# RewriteRule ^/~(.+) http://newserver/~$1 [R,L]
# fix slizone CSS htc file
RewriteRule ^content\/slizone\/(.*) http://www.slizone.com/content/slizone/$1 [R,L]
RewriteCond %{REQUEST_URI} !^/api/[^/]+\.php/.*
RewriteCond %{REQUEST_URI} !^/api/doc/.*
RewriteCond %{REQUEST_URI} !^/content/slizone/(.*)
RewriteRule ^api\/([^/]+)\/(.*)$ /api/$1.php/$2 [L,R]
RewriteRule (.*) dispatcher.php [L]
# RewriteRule ^.*\.(php|js|json|xml|css|ico|gif|jpg|jpeg|png|bmp|swf).*$ dispatcher.php
# {{{ Custom handler for compressing CSS and JavaScript files
# Implementation inspired and uses code from:
# http://rakaz.nl/item/make_your_pages_load_faster_by_combining_and_compressing_javascript_and_css_files
#
# Usage: following rules will automatically throw any .js or .css file into the combinator.php
#
# However, using this technique the desired way of including JavaScript and CSS files should be:
# /path/to/file/firstFile.js:secondFile.js:thirdFile.js
#
# which will pass all the desired JavaScript files to combinator which will compressed them
# altogether. Files are separated using ':' character.
#
# Previous has a huge impact on performance
# Uncomment following two rules to use nice URLs for CSS and JS optimization.
# Also set optimizers_use_url_rewrite to true in default_config.php
#RewriteRule ^(.*\.css) /combinator.php?t=css&f=$1 [L,QSA]
#RewriteRule ^(.*\.js) /combinator.php?t=javascript&f=$1 [L,QSA]
# }}}
</IfModule>
# ErrorDocument 404 /dispatcher.php
<IfModule mod_php5.c>
# Maximum allowed size for uploaded files.
php_value upload_max_filesize 32M
# Maximum size of POST data that PHP will accept.
php_value post_max_size 48M
# Maximum amount of memory a script may consume
php_value memory_limit 128M
# Maximum execution time of each script, in seconds
php_value max_execution_time 200
php_value max_input_time 200
# You should do your best to write your scripts so that they do not require
# register_globals to be on. Using form variables as globals can easily lead
# to possible security problems, if the code is not very well thought of.
php_flag register_globals off
# Magic quotes for incoming GET/POST/Cookie data.
php_flag magic_quotes_gpc off
# Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
php_flag magic_quotes_runtime off
# Whether to allow HTTP file uploads.
php_flag file_uploads on
# Handler used to store/retrieve data.
# php_value session.save_handler files
# Argument passed to save_handler. In the case of files, this is the path
# where data files are stored. Note: Windows users have to change this
# variable in order to use PHP's session functions.
# php_value session.save_path /tmp
# Whether to use cookies.
php_flag session.use_cookies on
# Name of the session (used as cookie name - PHPSESSID).
php_value session.name PHPSESSID
# Initialize session on request startup.
php_flag session.auto_start off
# Lifetime in seconds of cookie or, if 0, until browser is restarted.
php_value session.cookie_lifetime 0
# The path for which the cookie is valid.
# php_value session.cookie_path /
# The domain for which the cookie is valid.
# php_value session.cookie_domain
# Handler used to serialize data. php is the standard serializer of PHP.
# php_value session.serialize_handler php
# After this number of seconds, stored data will be seen as 'garbage' and
# cleaned up by the garbage collection process.
php_value session.gc_maxlifetime 1209600
</IfModule>