###############################
# Apache/PHP/SprdCMS settings.
##############################
# Protect .inc, .csv and .tpl from prying eyes.
<FilesMatch ".(inc|csv|tpl)$">
Order allow,deny
Deny from all
</FilesMatch>
## Don't show directory listings for URLs which map to a directory.
Options -Indexes
## 404 errors are sent back to index.php.
## You can set your own 404 document if you like.
ErrorDocument 404 /index.php
## Set the default handler.
DirectoryIndex index.php
## Default language and charset.
DefaultLanguage en-US
AddDefaultCharset UTF-8
## Don't reveal the server signature string.
ServerSignature Off
## Force simple error message for requests for non-existent favicon.ico.
<Files favicon.ico>
# There is no end quote below, for compatibility with Apache 1.3.
ErrorDocument 404 "The requested file favicon.ico was not found.
</Files>
## PHP 5, Apache 1 and 2 directives.
<IfModule mod_php5.c>
php_value magic_quotes_gpc 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
php_value max_execution_time 60
</IfModule>
## Various rewrite rules.
<IfModule mod_rewrite.c>
##Advise SprdCMS that the mod_rewrite module is available and ready to turn it on.
SetEnv HTTP_MOD_REWRITE On
##Uncomment the following line to turn on the rewrite engine.
RewriteEngine On
##Follow symbollic links in case webhost is using them for user directories.
Options +FollowSymLinks
##Some installations on a virtualhost might need this.
#RewriteBase /
##Tell the rewrite engine to ignore rewriting for existing files and directories.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
## Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>