AddDefaultCharset UTF-8
RewriteEngine On
DirectoryIndex index.php

## EXPIRES CACHING ##
# Включаем кэш в браузерах посетителей
<ifModule mod_headers.c>
# Все html и htm файлы будут храниться в кэше браузера один день
<FilesMatch "\.(html|htm)$">
Header set Cache-Control "max-age=43200"
</FilesMatch>
# Все css, javascript и текстовые файлы будут храниться в кэше браузера одну неделю
<FilesMatch "\.(js|txt)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
# Все флэш файлы и изображения будут храниться в кэше браузера один месяц
<FilesMatch "\.(flv|swf|ico|gif|jpg|jpeg|png|svg)$">
#2592000
Header set Cache-Control "max-age=2592000"
</FilesMatch>
# Отключаем кеширование php и других служебных файлов
<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
Header unset Cache-Control
</FilesMatch>
</IfModule>

<ifModule mod_expires.c>
ExpiresActive On
#по умолчанию кеш в 5 секунд
ExpiresDefault "access plus 5 seconds"
# Включаем кэширование изображений и флэш на месяц
ExpiresByType image/x-icon "access plus 1 month"
ExpiresByType image/jpeg "access plus 4 weeks"
ExpiresByType image/png "access plus 30 days"
ExpiresByType image/gif "access plus 43829 minutes"
ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
# Включаем кэширование css, javascript и текстовых файлов на одну неделю
ExpiresByType text/javascript "access plus 604800 seconds"
ExpiresByType application/javascript "access plus 604800 seconds"
ExpiresByType application/x-javascript "access plus 604800 seconds"
# Включаем кэширование html и htm файлов на один день
ExpiresByType text/html "access plus 43200 seconds"
# Включаем кэширование xml файлов на десять минут
ExpiresByType application/xhtml+xml "access plus 600 seconds"
</ifModule>
###

#НЕ ЗАРЕГЕСТРИРОВАН

RewriteRule ^index/$ /index.php [L,QSA] #главная стр

RewriteRule ^agreement/$ /jquery/modules/help/agreement.php [L,QSA] #соглашение

RewriteRule ^login/$ /index.php?id=1 [L,QSA] #авторизация

RewriteRule ^password/$ /index.php?id=2 [L,QSA] #восстановление пароля

RewriteRule ^start/$ /index.php?id=3 [L,QSA] #рег пользователя

RewriteRule ^profile/([a-zA-Z_0-9-/]*)$ /jquery/modules/profile.php?id=$1 [L,QSA] #профиль

RewriteRule ^chat/$ /jquery/modules/chat.php [L,QSA] #чат

RewriteRule ^titul_user/$ /jquery/modules/user_titul.php [L,QSA] #титулы

RewriteRule ^notification/$ /jquery/modules/notification.php [L,QSA] #оповещения

RewriteRule ^news/$ /jquery/modules/news.php [L,QSA] #новости

RewriteRule ^save/$ /jquery/modules/save.php [L,QSA] #сохранение

RewriteRule ^topic_idea_create/$ /jquery/modules/topic_idea_create.php [L,QSA] #создание топика

RewriteRule ^topic_idea_list/$ /jquery/modules/topic_idea_list.php [L,QSA] #топики

RewriteRule ^settings/$ /jquery/modules/settings.php [L,QSA] #настройки

RewriteRule ^gift/$ /jquery/modules/gift.php [L,QSA] #подарки

RewriteRule ^mail/$ /jquery/modules/mail.php [L,QSA] #почта

RewriteRule ^rating_liga/$ /jquery/modules/rating_liga.php [L,QSA] #рейтинг лиг

RewriteRule ^mail_contact/$ /jquery/modules/mail_contact.php [L,QSA] #контакты

RewriteRule ^orden/([a-zA-Z_0-9-/]*)$ /jquery/modules/orden/index.php?id=$1 [L,QSA] #орден

RewriteRule ^rating/$ /jquery/modules/rating.php [L,QSA] #рейтинг

RewriteRule ^tour_arena/$ /jquery/modules/rating_tour.php [L,QSA] #турнир

RewriteRule ^pay/$ /pay/index.php [L,QSA] #золото

RewriteRule ^admin/$ /jquery/admin/index.php [L,QSA] #админка

RewriteRule ^admin/news/$ /jquery/admin/news.php [L,QSA] #админка (создать новость)

RewriteRule ^admin/gold/$ /jquery/admin/gold.php [L,QSA] #админка (рейтинг золота)

RewriteRule ^shop/$ /jquery/modules/shop.php [L,QSA] #магазин

RewriteRule ^shop/item/$ /jquery/modules/shop_item.php [L,QSA] #снаряжение

RewriteRule ^shop/swit/$ /jquery/modules/shop_swit.php [L,QSA] #свитки

RewriteRule ^shop/otvar/$ /jquery/modules/shop_otvar.php [L,QSA] #отвары

RewriteRule ^shop/smitch/$ /jquery/modules/shop_smitch.php [L,QSA] #заточка

RewriteRule ^shop/rune/$ /jquery/modules/shop_rune.php [L,QSA] #руны

RewriteRule ^shop/premium/$ /jquery/modules/shop_premium.php [L,QSA] #премиум

RewriteRule ^task/$ /jquery/modules/task.php [L,QSA] #задания

RewriteRule ^online/$ /jquery/modules/online.php [L,QSA] #онлайн

RewriteRule ^task_event/$ /jquery/modules/task_event.php [L,QSA] #ивент

RewriteRule ^arena/$ /jquery/modules/arena.php [L,QSA] #арена

RewriteRule ^arena_liga/$ /jquery/modules/arena_liga.php [L,QSA] #лига

RewriteRule ^mail_contact/$ /jquery/modules/mail_contact.php [L,QSA] #контакты

RewriteRule ^item/([a-zA-Z_0-9-/]*)$ /jquery/modules/item.php?id=$1 [L,QSA] #снаряжение

RewriteRule ^boss/$ /jquery/modules/boss.php [L,QSA] #подземелье

RewriteRule ^orden_dead/$ /jquery/modules/orden_dead.php [L,QSA] #орден мертвых

RewriteRule ^medal/$ /jquery/modules/medal.php [L,QSA] #достижения

RewriteRule ^zamok/$ /jquery/modules/zamok.php [L,QSA] #владения

RewriteRule ^rudnik/$ /jquery/modules/rudnik.php [L,QSA] #рудники

RewriteRule ^dungeons/$ /jquery/modules/dungeons.php [L,QSA] #подземелья

RewriteRule ^info/$ /jquery/modules/info.php [L,QSA] #другое

RewriteRule ^rules/$ /jquery/modules/rules.php [L,QSA] #правила

RewriteRule ^help/$ /jquery/modules/help.php [L,QSA] #помощь по игре

RewriteRule ^admin_update/$ /jquery/admin/index.php [L,QSA] #панель управления

RewriteRule ^ban/$ /jquery/admin/ban_user.php [L,QSA] #бан игрока

RewriteRule ^bag/$ /jquery/modules/bag.php [L,QSA] #рюкзак

RewriteRule ^boss_test/$ /jquery/modules/new/boss.php [L,QSA] #TETS BOSS


#ЗАРЕГЕСТРИРОВАН

###
ErrorDocument 400 /index.php
ErrorDocument 401 /index.php
ErrorDocument 403 /index.php
ErrorDocument 404 /index.php
ErrorDocument 500 /index.php
