View file aiv2 AutoIndex/.htaccess

File size: 1.56Kb
####################
#    punK AI v2    #
#       2013       #
#    .htaccess     #
#  Rockitech Group #
####################

Options +FollowSymlinks
SetEnv _PAI[ver] '2.0'

#* To disable Apache Directory Indexing  *#
IndexOptions -FancyIndexing
Options -Indexes

#* Starting URL rewrite_module  *#
RewriteEngine on
#RewriteBase /

#* Removing www. from url *#
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,NC,L]

#* Beautiful URL Rewriting *#
RewriteRule ^switch/(mob|web)/$ switch.php?type=$1 [L]
RewriteRule ^index/home/([0-9]+)-([0-9]+)\.html$ index.php?sort=$1&page=$2 [L]
RewriteRule ^index/([^*]+)/([0-9]+)-([0-9]+)\.html$ index.php?dir=$1&sort=$2&page=$3 [L]
RewriteRule ^search/([^*]+)/([0-9]+)-([0-9]+)\.html$ search.php?search=$1&sort=$2&page=$3 [L]
RewriteRule ^view/([^*]+)\.html file.php?file=$1 [L]
RewriteRule ^dload/([^*]+) load.php?file=$1 [L]
RewriteRule ^updates-([0-9]+)\.html$ updates.php?page=$1 [L]

RewriteRule ^favicon\.ico$ customization/favicon.png [L]

#* Redirect for 404 Error *#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ error.php?%{REQUEST_FILENAME} [NC]

#* Deny access to system files *#
<Files ~ ".dat$|.pai$|.ptf$|footer.php$|header.php$|.htaccess$|.htpasswd$|config.php$|func.php$">
Order allow,deny
Deny from All
Satisfy All
</Files>

#* Allow GET and Post Request from all *#
<Limit GET POST>
Order allow,deny
Allow from all
</Limit>

#* Define the file to be opened by default *#
DirectoryIndex index.php index.htm index.html