Options -Indexes
DirectoryIndex index.php

<FilesMatch "\.(ini|sql)$"> 
order deny,allow 
deny from all 
</FilesMatch>

#php_flag register_globals off
#php_value arg_separator.output &
#php_value arg_separator.input &
#php_value magic_quotes_gpc off

<IfModule mod_rewrite.c>
	
	SetEnv MY_REWRITE 1
	
	RewriteEngine on
	Options +FollowSymlinks -Multiviews 
	
	#To redirect all images to a static location, so that there's no overhead 
	#If the image location is the same as the original URL, use a hyphen as the second argument.
	#RewriteRule   ^admin/.*$      -         [L]
	RewriteRule ^.*\.(jpg|gif|png|css|js)$ - [L,PT]
	
	# KNOWLEDGE -------------------
	
	RewriteRule ^([0-9]+)/?$ index.php?CategoryID=$1 [QSA,L]
	RewriteRule ^([a-zA-Z_]+)(/([0-9]+))?(/([a-zA-Z_]+))?/?$ index.php?View=$1&EntryID=$3&Msg=$5 [QSA,L]	
	RewriteRule ^([a-zA-Z_]+)(/([0-9]+))?(/([0-9]+))?(/([a-zA-Z_]+))?/?$ index.php?View=$1&CategoryID=$3&EntryID=$5&Msg=$7 [QSA,L]
	
	# /KNOWLEDGE -------------------

</IfModule>



#The maximum size of an uploaded file. 
#default 2M
#php_value upload_max_filesize "2M"

#Sets max size of post data allowed. This setting also affects file upload. 
#To upload large files, this value must be larger than upload_max_filesize. 
#default 8M
#php_value post_max_size "8M"

#If memory limit is enabled by your configure script,  
#also affects file uploading. Generally speaking, memory_limit should be larger than post_max_size. 
#default 8M
#php_value memory_limit "8M"