﻿DirectoryIndex index.php


RewriteEngine On

# Отключаем вывод ошибок пользователям
	php_flag display_errors off

# Регистрация
	RewriteRule ^reg/(/?)+$ index.php?go=register [L]
	
# Страница юзера
	RewriteRule ^u([0-9]+)(/?)+$ index.php?go=profile&id=$1 [L]
	RewriteRule ^u([0-9]+)after(/?)+$ index.php?go=profile&id=$1&after=1 [L]

# Гости 
    RewriteRule ^guests/clear(/?)+$ index.php?go=guests&act=clear [L]
    RewriteRule ^guests(/?)+$ index.php?go=guests [L]
    RewriteRule ^guests/([0-9]+)(/?)+$ index.php?go=guests&user_id=$1 [L]
    RewriteRule ^guests/([0-9]+)/page/([0-9]+)(/?)+$ index.php?go=guests&user_id=$1&page=$2 [L]
	
# Мисс AhıskalilaR
	RewriteRule ^miss/([0-9]+)(/?)+$ index.php?go=miss&act=page&id=$1 [L]
    RewriteRule ^miss(/?)+$ index.php?go=miss&act=top [L]

# Разделы
	RewriteRule ^about(/?)+$ index.php?go=about [L]
	RewriteRule ^terms(/?)+$ index.php?go=terms [L]
	RewriteRule ^jobs(/?)+$ index.php?go=jobs [L]

# Истории
	RewriteRule ^history(/?)+$ index.php?go=history [L]
	RewriteRule ^history&page=([0-9]+)(/?)+$ index.php?go=history&page=$1 [L]
	
# Редактирование страницы
	RewriteRule ^editmypage(/?)+$ index.php?go=editprofile [L]
	RewriteRule ^editmypage/contact(/?)+$ index.php?go=editprofile&act=contact [L]
	RewriteRule ^editmypage/interests(/?)+$ index.php?go=editprofile&act=interests [L]
	RewriteRule ^editmypage/all(/?)+$ index.php?go=editprofile&act=all [L]
	
# Альбомы
	RewriteRule ^albums/([0-9]+)(/?)+$ index.php?go=albums&uid=$1 [L]
	RewriteRule ^albums/add/([0-9]+)(/?)+$ index.php?go=albums&act=add&aid=$1 [L]
	RewriteRule ^albums/view/([0-9]+)(/?)+$ index.php?go=albums&act=view&aid=$1 [L]
	RewriteRule ^albums/view/([0-9]+)/page/([0-9]+)(/?)+$ index.php?go=albums&act=view&aid=$1&page=$2 [L]
	RewriteRule ^albums/comments/([0-9]+)(/?)+$ index.php?go=albums&act=all_comments&uid=$1 [L]
	RewriteRule ^albums/comments/([0-9]+)/page/([0-9]+)(/?)+$ index.php?go=albums&act=all_comments&uid=$1&page=$2 [L]
	RewriteRule ^albums/view/([0-9]+)/comments/(/?)+$ index.php?go=albums&act=all_comments&aid=$1 [L]
	RewriteRule ^albums/view/([0-9]+)/comments/page/([0-9]+)(/?)+$ index.php?go=albums&act=all_comments&aid=$1&page=$2 [L]
	RewriteRule ^albums/editphotos/([0-9]+)(/?)+$ index.php?go=albums&act=edit_pos_photos&aid=$1 [L]
	RewriteRule ^albums/newphotos(/?)+$ index.php?go=albums&act=new_photos [L]
	RewriteRule ^albums/newphotos/([0-9]+)(/?)+$ index.php?go=albums&act=new_photos&page=$1 [L]
	
# Просмотр фотографий
	RewriteRule ^photo([0-9]+)_([0-9]+)_sec=user_page(/?)+$ index.php?go=profile&id=$1 [L]
	RewriteRule ^photo([0-9]+)_([0-9]+)_sec=all_comments(/?)+$ index.php?go=albums&act=all_comments&uid=$1 [L]
	RewriteRule ^photo([0-9]+)_([0-9]+)_sec=wall/fuser=([0-9]+)(/?)+$ index.php?go=profile&id=$3 [L]
	RewriteRule ^photo([0-9]+)_([0-9]+)_sec=notes/id=([0-9]+)(/?)+$ index.php?go=notes&act=view&note_id=$3 [L]
	RewriteRule ^photo([0-9]+)_([0-9]+)_sec=news(/?)+$ index.php?go=news [L]
	RewriteRule ^photo([0-9]+)_([0-9]+)_sec=msg/id=([0-9]+)(/?)+$ index.php?go=messages&act=review&mid=$3 [L]
	RewriteRule ^photo([0-9]+)_([0-9]+)_([0-9]+)(/?)+$ index.php?go=albums&act=view&aid=$3 [L]
	RewriteRule ^photo([0-9]+)_([0-9]+)_([0-9]+)_sec=album_comments(/?)+$ index.php?go=albums&act=all_comments&aid=$3 [L]
	RewriteRule ^photo([0-9]+)_([0-9]+)_([0-9]+)_sec=newphotos(/?)+$ index.php?go=albums&act=new_photos [L]

# Друзья
	RewriteRule ^friedns/send_demand/([0-9]+)(/?)+$ index.php?go=friends&act=send_demand&for_user_id=$1 [L]
	RewriteRule ^friedns/take/([0-9]+)(/?)+$ index.php?go=friends&act=take&take_user_id=$1 [L]
	RewriteRule ^friedns/reject/([0-9]+)(/?)+$ index.php?go=friends&act=reject&reject_user_id=$1 [L]
	RewriteRule ^friends(/?)+$ index.php?go=friends [L]
	RewriteRule ^friends/([0-9]+)(/?)+$ index.php?go=friends&user_id=$1 [L]
	RewriteRule ^friends/([0-9]+)/page/([0-9]+)(/?)+$ index.php?go=friends&user_id=$1&page=$2 [L]
	RewriteRule ^friends/online/([0-9]+)(/?)+$ index.php?go=friends&act=online&user_id=$1 [L]
	RewriteRule ^friends/online/([0-9]+)/page/([0-9]+)(/?)+$ index.php?go=friends&act=online&user_id=$1&page=$2 [L]
	RewriteRule ^friends/requests(/?)+$ index.php?go=friends&act=requests [L]
	RewriteRule ^friends/requests/page/([0-9]+)(/?)+$ index.php?go=friends&act=requests&page=$1 [L]
	RewriteRule ^friends/common/([0-9]+)(/?)+$ index.php?go=friends&act=common&uid=$1 [L]
	RewriteRule ^friends/common/([0-9]+)/page/([0-9]+)(/?)+$ index.php?go=friends&act=common&uid=$1&page=$2 [L]

	
# Закладки
	RewriteRule ^fave(/?)+$ index.php?go=fave [L]
	RewriteRule ^fave/page/([0-9]+)(/?)+$ index.php?go=fave&page=$1 [L]	

# Заметки
	RewriteRule ^notes(/?)+$ index.php?go=notes [L]
	RewriteRule ^notes/add(/?)+$ index.php?go=notes&act=add [L]
	RewriteRule ^notes/edit/([0-9]+)(/?)+$ index.php?go=notes&act=edit&note_id=$1 [L]
	RewriteRule ^notes/view/([0-9]+)(/?)+$ index.php?go=notes&act=view&note_id=$1 [L]
	RewriteRule ^notes/([0-9]+)(/?)+$ index.php?go=notes&get_user_id=$1 [L]
	RewriteRule ^notes/([0-9]+)/page/([0-9]+)(/?)+$ index.php?go=notes&get_user_id=$1&page=$2 [L]
	
# Видео
	RewriteRule ^videos(/?)+$ index.php?go=videos [L]
	RewriteRule ^videos/([0-9]+)(/?)+$ index.php?go=videos&get_user_id=$1 [L]
	RewriteRule ^videos/([0-9]+)/page/([0-9]+)(/?)+$ index.php?go=videos&get_user_id=$1&page=$2 [L]
	RewriteRule ^videos/([0-9]+)(/?)+$ index.php?go=videos&get_user_id=$1 [L]
	RewriteRule ^video([0-9]+)_([0-9]+)(/?)+$ index.php?go=videos&get_user_id=$1 [L]
	RewriteRule ^video([0-9]+)_([0-9]+)_sec=wall/fuser=([0-9]+)(/?)+$ index.php?go=profile&id=$3 [L]
	RewriteRule ^video([0-9]+)_([0-9]+)_sec=notes/id=([0-9]+)(/?)+$ index.php?go=notes&act=view&note_id=$3 [L]
	RewriteRule ^video([0-9]+)_([0-9]+)_sec=news(/?)+$ index.php?go=news [L]
	RewriteRule ^video([0-9]+)_([0-9]+)_sec=msg/id=([0-9]+)(/?)+$ index.php?go=messages&act=review&mid=$3 [L]
	
# Поиск
	RewriteRule ^search/query=(.*)&type=([0-3]+)(/?)+$ index.php?go=search&query=$1&type=$2 [L]
	
# Новости
	RewriteRule ^news(/?)+$ index.php?go=news [L]
	RewriteRule ^news/updates(/?)+$ index.php?go=news&type=updates [L]
	RewriteRule ^news/photos(/?)+$ index.php?go=news&type=photos [L]
	RewriteRule ^news/videos(/?)+$ index.php?go=news&type=videos [L]
	RewriteRule ^news/notifications(/?)+$ index.php?go=news&type=notifications [L]
	
# Сообщения
	RewriteRule ^messages(/?)+$ index.php?go=messages [L]
	RewriteRule ^messages/i(/?)+$ index.php?go=messages&info=1 [L]
	RewriteRule ^messages/outbox(/?)+$ index.php?go=messages&act=outbox [L]
	RewriteRule ^messages/show/([0-9]+)(/?)+$ index.php?go=messages&act=review&mid=$1 [L]
	
# Стена
	RewriteRule ^wall([0-9]+)(/?)+$ index.php?go=wall&uid=$1&type=page [L]
	RewriteRule ^wall([0-9]+)/page/([0-9]+)(/?)+$ index.php?go=wall&uid=$1&type=page&page=$2 [L]
	RewriteRule ^wall([0-9]+)_sec=own(/?)+$ index.php?go=wall&uid=$1&type=own [L]
	RewriteRule ^wall([0-9]+)_sec=own&page=([0-9]+)(/?)+$ index.php?go=wall&uid=$1&type=own&page=$2 [L]
	RewriteRule ^wall([0-9]+)_([0-9]+)(/?)+$ index.php?go=wall&uid=$1&rid=$2&type=record [L]
	
# Настройки
	RewriteRule ^settings(/?)+$ index.php?go=settings [L]
	RewriteRule ^settings/privacy(/?)+$ index.php?go=settings&act=privacy [L]
	RewriteRule ^settings/blacklist(/?)+$ index.php?go=settings&act=blacklist [L]
	
# Помощь
	RewriteCond %{QUERY_STRING} ^act=([a-z]+)
	RewriteRule ^(.*)support $1index.php?go=support [QSA,L]

	RewriteCond %{QUERY_STRING} ^page=([0-9]+)
	RewriteRule ^(.*)support $1index.php?go=support [QSA,L]
	RewriteRule ^support(/?)+$ index.php?go=support [L]
	
# Воостановление пароля
	RewriteCond %{QUERY_STRING} ^act=([a-z]+)
	RewriteRule ^(.*)restore $1index.php?go=restore [QSA,L]
	RewriteRule ^restore(/?)+$ index.php?go=restore [L]
	
# Блог сайта
	RewriteCond %{QUERY_STRING} ^act=([a-z]+)
	RewriteRule ^(.*)blog $1index.php?go=blog [QSA,L]
	
	RewriteCond %{QUERY_STRING} ^id=([0-9]+)
	RewriteRule ^(.*)blog $1index.php?go=blog [QSA,L]
	RewriteRule ^blog(/?)+$ index.php?go=blog [L]
	
# UBM
	RewriteCond %{QUERY_STRING} ^act=([a-z]+)
	RewriteRule ^(.*)balance $1index.php?go=balance [QSA,L]
	RewriteRule ^balance(/?)+$ index.php?go=balance [L]
	
# Реф. ссылка на регистрацию
	RewriteRule ^reg([0-9]+)(/?)+$ index.php?reg=$1 [L]
	
# Подарки
	RewriteCond %{QUERY_STRING} ^new=([0-9]+)
	RewriteRule ^(.*)gifts([0-9]+) $1index.php?go=gifts&uid=$2 [QSA,L]
	
	RewriteCond %{QUERY_STRING} ^page=([0-9]+)
	RewriteRule ^(.*)gifts([0-9]+) $1index.php?go=gifts&uid=$2 [QSA,L]
	
	RewriteRule ^gifts([0-9]+)(/?)+$ index.php?go=gifts&uid=$1 [L]

# Сообщества
	RewriteCond %{QUERY_STRING} ^act=([a-z]+)
	RewriteRule ^(.*)groups $1index.php?go=groups [QSA,L]

	RewriteCond %{QUERY_STRING} ^page=([0-9]+)
	RewriteRule ^(.*)groups $1index.php?go=groups [QSA,L]
	RewriteRule ^groups(/?)+$ index.php?go=groups [L]
	
	RewriteRule ^wallgroups([0-9]+)_([0-9]+)(/?)+$ index.php?go=groups&act=wallgroups&pid=$1&id=$2 [L]
	
# Музыка
	RewriteRule ^audio(/?)+$ index.php?go=audio [L]
	RewriteRule ^audio([0-9]+)(/?)+$ index.php?go=audio&uid=$1 [L]

# Документы
	RewriteRule ^docs(/?)+$ index.php?go=doc&act=list [L]

# Сообщества -> Публичные страницы -> Аудио
	RewriteRule ^public/audio([0-9]+)(/?)+$ index.php?go=public_audio&pid=$1 [L]

# Сообщества -> Публичные страницы -> Видео
	RewriteRule ^public/videos([0-9]+)(/?)+$ index.php?go=public_videos&pid=$1 [L]

# Сообщества -> Публичные страницы -> Обсуждения
	RewriteCond %{QUERY_STRING} ^act=([a-z]+)
	RewriteRule ^(.*)forum([0-9]+) $1index.php?go=groups_forum&public_id=$2 [QSA,L]

	RewriteCond %{QUERY_STRING} ^page=([0-9]+)
	RewriteRule ^(.*)forum([0-9]+) $1index.php?go=groups_forum&public_id=$2 [QSA,L]
	RewriteRule ^forum([0-9]+)(/?)+$ index.php?go=groups_forum&public_id=$1 [L]
	
# Сообщества -> Публичные страницы
	RewriteCond %{QUERY_STRING} ^act=([a-z]+)
	RewriteRule ^public([0-9]+)(/?)+$ index.php?go=public&pid=$1 [L]
	
	RewriteRule ^public([0-9]+)(/?)+$ index.php?go=public&pid=$1 [L]
	RewriteRule ^([^.]+)/?$ index.php?go=public&get_adres=$1 [L]

# Стат страницы
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteRule ^([^/]+).html$ index.php?go=static&page=$1 [L]