AddType application/x-httpd-php .php

ErrorDocument 404 /

DirectoryIndex index.php

php_flag magic_quotes_runtime off
php_flag magic_quotes_gpc on
php_flag register_globals on

<Files approve.php>
	AuthType basic
	AuthName "ami admin system"
	AuthUserFile /var/www/cal/includes/.passwd
	require valid-user
</Files>

<Files init.txt>
	allow from none
	deny from all
</Files>

RewriteEngine on
RewriteRule	^([^/]+)/$			index.php?site=$1&%{QUERY_STRING}		[L]
RewriteRule	^([^/]+)/([0-9]+)/$		index.php?site=$1&pid=$2&%{QUERY_STRING}	[L]
RewriteRule	^([^/]+)/([0-9]+)/bad/$		bad.php?site=$1&pid=$2&%{QUERY_STRING}		[L]
RewriteRule	^([^/]+)/([0-9]+)/waiting/$	waiting.php?site=$1&pid=$2&%{QUERY_STRING}	[L]
RewriteRule	^([^/]+)/r([0-9]+)/$		index.php?site=$1&rate=$2&%{QUERY_STRING}	[L]
RewriteRule	^([^/]+)/submit/$		submit.php?site=$1&%{QUERY_STRING}		[L]
RewriteRule	^([^/]+)/bad_image/$		bad_image.php?site=$1&%{QUERY_STRING}		[L]
