clipbucket/upload/.htaccess
Arslan Hassan 7888c52e44 ADDED : New Group System
FIXED : has_access function
ADDED : New Group Management System
ADDED : NEW rewrite_rules for SEO links
UPDATED : ClipBucket favicon.ico
2009-12-21 21:11:54 +00:00

146 lines
No EOL
5.2 KiB
ApacheConf

#<IfModule mod_security.c>
# secfilterengine off
# secfilterscanPOST off
#</IfModule>
#Options +Indexes
#php_flag safe_mode off
#php_value max_execution_time 1000
#php_value session.gc_maxlifetime 14000
#php_value output_buffering on
#php_value upload_max_filesize 2147483648
#php_value post_max_size 2147483648
#php_flag display_errors off
Options All -Indexes
FileETag MTime Size
Options +FollowSymlinks
RewriteEngine on
<FilesMatch "\.(db|inc|html|tmpl|h|ihtml|sql|ini|configuration|config|class|bin|spd|theme|module|cfg|cpl|tmp|log|err|inc.php|class.php)$">
order allow,deny
satisfy all
</FilesMatch>
########## Begin - Rewrite rules to block out some common exploits
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
#RewriteRule ^(.*)$ index.php [L]
RewriteRule ^([^.]*)/?$ index.php [L]
#
########## End - Rewrite rules to block out some common exploits
########## Begin - Rewrite rules For SEO urls ######################
#
#Options +FollowSymlinks
#RewriteEngine on
#
#
#
#URL Rewriting for Videos
RewriteRule ^videos/([0-9a-z].+)/(.*)/(.*)/(.*)/(.*) videos.php?cat=$1&sort=$3&time=$4&page=$5&seo_cat_name=$2 [L]
RewriteRule ^videos videos.php [L]
RewriteRule ^video/(.*)/(.*) watch_video.php?v=$1&%{QUERY_STRING} [L]
RewriteRule ^user/videos/(.*)$ user_videos.php?user=$1&%{QUERY_STRING}
#
#
#
#Signup Login & Logout URL Rewriting
RewriteRule ^login$ signup.php [nc]
RewriteRule ^login/success login_success.php [nc]
RewriteRule ^logout/success logout_success.php [nc]
RewriteRule ^signup/success signup_success.php [nc]
RewriteRule ^signup$ signup.php [nc]
RewriteRule ^logout$ logout.php [nc]
#
#
#
#Messages
RewriteRule ^message/sent sent.php [nc]
RewriteRule ^message/inbox inbox.php [nc]
RewriteRule ^message/compose compose.php [nc]
RewriteRule ^message$ inbox.php [nc]
#
#
#
#Users, Channel & Management
#
RewriteRule ^channels/([0-9A-Za-z]+)/(.*)/(.*)/(.*)/(.*) channels.php?cat=$1&sort=$3&time=$4&page=$5&seo_cat_name=$2 [L]
RewriteRule ^channels channels.php [L]
RewriteRule ^members/ channels.php [nc]
RewriteRule ^users/ channels.php [nc]
#
RewriteRule ^user/ channels.php [nc]
RewriteRule ^user/channel/(.*) view_channel.php?user=$1 [nc]
RewriteRule ^channel/(.*) view_channel.php?user=$1 [nc]
RewriteRule ^user/contacts/(.*) user_contacts.php?user=$1 [nc]
RewriteRule ^user/videos/(.*) user_videos.php?user=$1 [nc]
RewriteRule ^user/favourites/(.*) user_fav_videos.php?user=$1 [nc]
#
RewriteRule ^myaccount myaccount.php [nc]
RewriteRule ^manage/videos/ manage_videos.php [nc]
RewriteRule ^manage/favourites/ manage_favourites.php [nc]
RewriteRule ^manage/contacts/ manage_contacts.php [nc]
RewriteRule ^manage/subscriptions/ manage_subscriptions.php [nc]
RewriteRule ^manage/account user_account.php [nc]
RewriteRule ^manage/video/edit edit_video.php [nc]
#
#
#
#Pages
RewriteRule ^pages/help help.php [nc]
RewriteRule ^pages/privacy privacy.php [nc]
RewriteRule ^pages/termsofuse termsofuse.php [nc]
RewriteRule ^pages/contactus contactus.php [nc]
RewriteRule ^pages/aboutus aboutus.php [nc]
#
#
#
#Miscellenous
RewriteRule ^subscriptions manage_subscriptions.php [nc]
RewriteRule ^search/result search_result.php [nc]
RewriteRule ^upload upload.php [nc]
RewriteRule ^External/Upload external_upload.php [nc]
#
#
#Group Section
RewriteRule ^group/([a-zA-Z0-9].+) view_group.php?url=$1&%{QUERY_STRING} [L]
RewriteRule ^view_topic/([a-zA-Z0-9].+)_tid_([0-9]+) view_topic.php?tid=$2&%{QUERY_STRING} [L]
RewriteRule ^groups/([0-9a-z].+)/(.*)/(.*)/(.*)/(.*) groups.php?cat=$1&sort=$3&time=$4&page=$5&seo_cat_name=$2 [L]
RewriteRule ^groups groups.php [L]
RewriteRule ^sitemap.xml$ sitemap.php
#Error Pages
ErrorDocument 404 /error_pages/404.php
ErrorDocument 403 /error_pages/403.php
########## End - Rewrite rules For SEO urls ######################
RewriteRule ^rss$ rss.php [nc]
RewriteRule ^rss/([a-zA-Z0-9].+)$ rss.php?show=$1 [nc]
########## End - Rewrite rules For SEO urls ######################
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType image/gif "access plus 1 months"
ExpiresByType image/jpeg "access plus 1 months"
ExpiresByType image/png "access plus 1 months"
</IfModule>