# Do not remove this line or mod_rewrite rules and search engine friendly URLs will stop working
RewriteBase /

#Default

#Error document
Options -Indexes
ErrorDocument 403 /403.php
ErrorDocument 404 /403.php
DirectoryIndex index.php

#Add type
Addtype application/zip .zip
Addtype application/x-rar-compressed .rar
AddType application/vnd.sonyericsson.mms-template tpl
AddType application/vnd.eri.thm .thm 
AddType application/vnd.mophun.application .mpn  
AddType application/vnd.mophun.certificate .mpc
AddType application/vnd.smaf .mmf
AddType application/x-tar .hid
Addtype application/smil .smil 
Addtype application/smil .smi 
Addtype application/java-archive .jar 
Addtype application/vnd.symbian.install .sis
Addtype application/vnd.wap.mms-message .mms
Addtype application/octet-stream .exe
Addtype text/x-imelody .imy 
Addtype text/x-emelody .emy 
Addtype text/x-vcard .vcf 
Addtype text/x-vcalendar .vcs 
Addtype text/calendar .ics
AddType text/vnd.sun.j2me.app-descriptor;charset=UTF-8 .jad
Addtype text/x-vmel .mel
Addtype text/x-vmel .emy
Addtype audio/imelody .imy
AddType audio/amr .amr
AddType audio/x-wav .wav
Addtype audio/wav .wav 
Addtype audio/midi .midi 
Addtype audio/midi .mid 
Addtype audio/rmf .rmf
Addtype image/jpeg .jpg 
Addtype image/jpeg .jpeg 
Addtype image/gif .gif 
Addtype image/png .png 
Addtype image/bmp .bmp 
AddType video/mp4 .mp4
Addtype video/3gpp .3gp

#File type
RemoveHandler .phtml .php3 .php4 .php5 .php6 .phps .cgi .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .py
AddType application/x-httpd-php-source .phtml .php3 .php4 .php5 .php6 .phps .cgi .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .py

AddDefaultCharset UTF-8

<IfModule mod_expires.c>
    ExpiresActive on
    ExpiresDefault                                      "access plus 1 month"

  # CSS
    ExpiresByType text/css                              "access plus 1 year"

  # Data interchange
    ExpiresByType application/json                      "access plus 0 seconds"
    ExpiresByType application/ld+json                   "access plus 0 seconds"
    ExpiresByType application/xml                       "access plus 0 seconds"
    ExpiresByType text/xml                              "access plus 0 seconds"

  # Favicon (cannot be renamed!) and cursor images
    ExpiresByType image/x-icon                          "access plus 1 week"

  # HTML components (HTCs)
    ExpiresByType text/x-component                      "access plus 1 month"

  # HTML
    ExpiresByType text/html                             "access plus 0 seconds"

  # JavaScript
    ExpiresByType application/javascript                "access plus 1 year"

  # Manifest files
    ExpiresByType application/x-web-app-manifest+json   "access plus 0 seconds"
    ExpiresByType text/cache-manifest                   "access plus 0 seconds"

  # Media
    ExpiresByType audio/ogg                             "access plus 1 month"
    ExpiresByType image/gif                             "access plus 1 month"
    ExpiresByType image/jpeg                            "access plus 1 month"
    ExpiresByType image/png                             "access plus 1 month"
    ExpiresByType video/mp4                             "access plus 1 month"
    ExpiresByType video/ogg                             "access plus 1 month"
    ExpiresByType video/webm                            "access plus 1 month"

  # Web feeds
    ExpiresByType application/atom+xml                  "access plus 1 hour"
    ExpiresByType application/rss+xml                   "access plus 1 hour"
</IfModule>

#Mod rewrite
RewriteBase /
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^profile/(.*?)$ profile/index.php?wl=$1 [NC,L]

#File ignore
IndexIgnore *.zip *.jpg *.rar *.png

RewriteEngine On
RewriteBase /
RewriteRule ^forum/(.*)_([0-9]+).html$ forum/index.php?id=$2 [L]
RewriteRule ^forum/(.*)_([0-9]+)_p([0-9]+).html$ forum/index.php?id=$2&page=$3 [L]
RewriteRule ^forum/(.*)_p([0-9]+).html$ forum/index.php?act=post&id=$2 [L]
RewriteRule ^forum/(.*)_([0-9]+)_s([0-9]+).html$ forum/index.php?id=$2&start=$3 [L]
RewriteRule ^forum/(.*)_([0-9]+)_clip_p([0-9]+).html$ forum/index.php?id=$2&clip&page=$3 [L]

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php56” package as the default “PHP” programming language.
<IfModule mime_module>
  AddType application/x-httpd-ea-php56 .php .php5 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
