AddDefaultCharset utf-8

DirectoryIndex index.php
Options +FollowSymLinks
RewriteEngine on
RewriteBase /app/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f



RewriteRule ^offer.php$ ?act=oferta [L]
RewriteRule ^([0-9]+)$ baner.php?id=$1 [QSA,L]
RewriteRule ^404.php$ ?act=404 [L]

RewriteRule ^agreement/?$ ?act=agreement [L]

RewriteRule ^plan/?$ ?act=plan [L]
RewriteRule ^login/?$ ?act=login [L]
RewriteRule ^account/?$ ?act=account [L]
RewriteRule ^shop/?$ ?act=shop [L]
RewriteRule ^installs/?$ ?act=installs [L]
RewriteRule ^myapps/?$ ?act=myapps [L]
RewriteRule ^statistics/?$ ?act=statistics [L]
RewriteRule ^send/?$ ?act=send [L]
RewriteRule ^faq/?$ ?act=faq [L]
RewriteRule ^order/?$ ?act=order [L]


RewriteRule ^start_app/?$ ?act=start_app [L]
RewriteRule ^spend_app/?$ ?act=spend_app [L]
RewriteRule ^shop_app/?$ ?act=shop_app [L]
RewriteRule ^account_app/?$ ?act=account_app [L]
RewriteRule ^stat_app/?$ ?act=stat_app [L]
RewriteRule ^ads_app/?$ ?act=ads_app [L]
RewriteRule ^obj_/?$ ?act=obj_ [L]

RewriteRule ^board_edit_foto/?$ ?act=board_edit_foto [L]
RewriteRule ^board_edit_foto/?$ ?act=board_edit_foto [L]
RewriteRule ^board_edit_foto/([0-9]+)$ ?act=board_edit_foto&addf_=$1 [L]

RewriteRule ^ok/?$ ?act=ok [L]

#app
RewriteRule ^ad/?$ ?act=ad [L]

RewriteRule ^ad_/?$ ?act=ad_ [L]
RewriteRule ^ad_/([0-9]+)$ ?act=ad_&addf_=$1 [QSA,L]

RewriteRule ^ad_/all/([0-9]+)$ ?act=ad_&addf_all=$1 [L]
RewriteRule ^ad_/friends/([0-9]+)$ ?act=ad_&adfr_=$1 [L]
RewriteRule ^ad_/karma/([0-9]+)$ ?act=ad_&karma_&karma_ad=$1 [L]

RewriteRule ^add_ad_/?$ ?act=add_ad_ [L]
RewriteRule ^add_ad_/add/$ ?act=add_ad_&add [L]


RewriteRule ^section/([0-9]+)$ ?act=section&sh=$1 [QSA,L]
RewriteRule ^section_/([0-9]+)$ ?act=section_&sh_=$1 [QSA,L]
#RewriteRule ^section/([0-9]+)$ ?act=section&sh=$1 [L]
RewriteRule ^search_app/?$ ?act=search_app [L]
RewriteRule ^search_app/([0-9]+)$ ?act=search_app&sh=$1 [L]

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

ErrorDocument 404 /404.php

AddType application/x-httpd-php .js
AddHandler x-httpd-php5 .js

<FilesMatch "\.js$">
SetHandler application/x-httpd-php
</FilesMatch>


