Your IP : 216.73.216.170


Current Path : /var/www/iplanru/data/www/iplan.5018.vps.agava.net/
Upload File :
Current File : /var/www/iplanru/data/www/iplan.5018.vps.agava.net/.htaccess.20150819

##
# @package		Joomla
# @copyright	Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved.
# @license		GNU General Public License version 2 or later; see LICENSE.txt
##

##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
##

## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

## Mod_rewrite in use.

#RewriteEngine On
#RewriteCond %{HTTPS} on
#RewriteRule ^robots\.txt$ robots-https.txt


RewriteEngine On

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a  tag in URL.
RewriteCond %{QUERY_STRING} (%3C|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F,L]
#
## End - Rewrite rules to block out some common exploits.

## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#


#main page
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php
RewriteRule ^index\.php$ / [L,R=301]

#redirect for subdomains
RewriteCond %{HTTP_HOST} ^(.*).i-plan.ru$ [NC]
RewriteRule ^(.*)$ http://i-plan.ru%{REQUEST_URI} [R=301,NC,L,QSA]

RewriteCond %{HTTP_HOST} ^(.*).intesco.ru$ [NC]
RewriteRule ^(.*)$ http://i-plan.ru%{REQUEST_URI} [R=301,NC,L,QSA]

RewriteCond %{HTTP_HOST} ^(.*).agava.net$ [NC]
RewriteRule ^(.*)$ http://i-plan.ru%{REQUEST_URI} [R=301,NC,L,QSA]




php_value auto_prepend_file "/var/www/iplanru/data/www/i-plan.ru/replaceuri.php"

# adaptation to the structure 3-----------------------------------------

RewriteRule ^bp\.php/$ /bp.php [R=301,L]

RewriteCond %{QUERY_STRING} ^id=([0-9]+)$
RewriteRule ^(bp|mi)\.php$ /catalog.php?id=%1 [R=301,L]



RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(?:index\.php)?\?option=com_zoo&item_id=([0-9]+)&Itemid=1(0[89]|17)&view=item\ HTTP/
RewriteRule ^(index\.php)?$ /catalog.php?id=%1 [R=301,L]
RewriteCond %{QUERY_STRING} ^id=([0-9]+)$
RewriteRule ^catalog\.php$ /?option=com_zoo&item_id=%1&Itemid=117&view=item

#dop parameters
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(?:index\.php)?\?option=com_zoo&item_id=([0-9]+)&Itemid=1(0[89]|17)&view=item\ HTTP/
RewriteRule ^(index\.php)?$ /catalog.php?id=%1 [R=301,L]
RewriteCond %{QUERY_STRING} ^id=([0-9]+)(.+)$
RewriteRule ^catalog\.php$ /?option=com_zoo&item_id=%1&Itemid=117&view=item&%2

#pay http://i-plan.ru/index.php/component/pay/payment?method=bpn&item_id=0&lang=ru
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(?:index\.php)?\?option=com_pay&view=payment&method==([a-z]+)\ HTTP/
#RewriteRule ^(index\.php)?$ /pay.php?method=%1 [R=301,L]
#RewriteCond %{QUERY_STRING} ^method=([a-z]+)$
#RewriteRule ^pay\.php$ /?option=com_pay&view=payment&method=%1

#-----------------------------------------------------------------------


#items bp
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(?:index\.php)?\?option=com_zoo&item_id=([0-9]+)&Itemid=108&view=item\ HTTP/
RewriteRule ^(index\.php)?$ /bp.php?id=%1 [R=301,L]
RewriteCond %{QUERY_STRING} ^id=([0-9]+)$
RewriteRule ^bp\.php$ /?option=com_zoo&item_id=%1&Itemid=108&view=item

RewriteCond %{QUERY_STRING} ^id=([0-9]+)/$
RewriteRule ^bp\.php$ - [R=404,L]

#items bp dop parameters
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(?:index\.php)?\?option=com_zoo&item_id=([0-9]+)&Itemid=108&view=item\ HTTP/
RewriteRule ^(index\.php)?$ /bp.php?id=%1 [R=301,L]
RewriteCond %{QUERY_STRING} ^id=([0-9]+)(.+)$
RewriteRule ^bp\.php$ /?option=com_zoo&item_id=%1&Itemid=108&view=item&%2


#items mi
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(?:index\.php)?\?option=com_zoo&item_id=([0-9]+)&Itemid=109&view=item\ HTTP/
RewriteRule ^(index\.php)?$ /mi.php?id=%1 [R=301,L]
RewriteCond %{QUERY_STRING} ^id=([0-9]+)$
RewriteRule ^mi\.php$ /?option=com_zoo&item_id=%1&Itemid=109&view=item

RewriteCond %{QUERY_STRING} ^id=([0-9]+)/$
RewriteRule ^mi\.php$ - [R=404,L]

#items mi dop parameters
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(?:index\.php)?\?option=com_zoo&item_id=([0-9]+)&Itemid=109&view=item\ HTTP/
RewriteRule ^(index\.php)?$ /mi.php?id=%1 [R=301,L]
RewriteCond %{QUERY_STRING} ^id=([0-9]+)(.+)$
RewriteRule ^mi\.php$ /?option=com_zoo&item_id=%1&Itemid=109&view=item&%2


#items mi en
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(?:index\.php)?\?option=com_zoo&view=item&item_id=([0-9]+)&Itemid=210&lang=([a-z]+)\ HTTP/
#RewriteRule ^(index\.php)?$ /%2/mi.php?id=%1 [R=301,L]
#RewriteCond %{QUERY_STRING} id=([0-9]+)&lang=([a-z]+)
#RewriteRule ^\/en\/mi\.php$ /?option=com_zoo&view=item&item_id=%1&Itemid=210&lang=%2







#category bp
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(?:index\.php)?\?option=com_zoo&category_id=([0-9]+)&Itemid=108&view=category\ HTTP/
RewriteRule ^(index\.php)?$ /bp.php?cat=%1 [R=301,L]
RewriteCond %{QUERY_STRING} ^cat=([0-9]+)$
RewriteRule ^bp\.php$ /?option=com_zoo&category_id=%1&Itemid=108&view=category

#category bp page
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(?:index\.php)?\?option=com_zoo&category_id=([0-9]+)&Itemid=108&view=category&page=([0-9]+)\ HTTP/
RewriteRule ^(index\.php)?$ /bp.php?cat=%1&page=%2 [R=301,L]
RewriteCond %{QUERY_STRING} cat=([0-9]+)&page=([0-9]+)
RewriteRule ^bp\.php$ /?option=com_zoo&category_id=%1&Itemid=108&view=category&page=%2

#category mi
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(?:index\.php)?\?option=com_zoo&category_id=([0-9]+)&Itemid=109&view=category\ HTTP/
RewriteRule ^(index\.php)?$ /mi.php?cat=%1 [R=301,L]
RewriteCond %{QUERY_STRING} ^cat=([0-9]+)$
RewriteRule ^mi\.php$ /?option=com_zoo&category_id=%1&Itemid=109&view=category

#category mi page
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(?:index\.php)?\?option=com_zoo&category_id=([0-9]+)&Itemid=109&view=category&page=([0-9]+)\ HTTP/
RewriteRule ^(index\.php)?$ /mi.php?cat=%1&page=%2 [R=301,L]
RewriteCond %{QUERY_STRING} cat=([0-9]+)&page=([0-9]+)
RewriteRule ^mi\.php$ /?option=com_zoo&category_id=%1&Itemid=109&view=category&page=%2


#language corrections
#items bp en
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(?:index\.php)?\?option=com_zoo&view=item&item_id=([0-9]+)&Itemid=108&lang=([a-z]+)\ HTTP/
#RewriteRule ^(index\.php)?$ /%2/bp.php?id=%1 [R=301,L]
#RewriteCond %{QUERY_STRING} ^id=([0-9]+)$
#RewriteRule ^en/bp\.php$ /?option=com_zoo&view=item&item_id=%1&Itemid=108&lang=en


#experience
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(?:index\.php)?\?option=com_zoo&item_id=([0-9]+)&Itemid=195&view=item\ HTTP/
RewriteRule ^(index\.php)?$ /experience.php?id=%1 [R=301,L]
RewriteCond %{QUERY_STRING} ^id=([0-9]+)$
RewriteRule ^experience\.php$ /?option=com_zoo&item_id=%1&Itemid=195&view=item

#category experience
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(?:index\.php)?\?option=com_zoo&category_id=([0-9]+)&Itemid=195&view=category\ HTTP/
RewriteRule ^(index\.php)?$ /experience.php?cat=%1 [R=301,L]
RewriteCond %{QUERY_STRING} ^cat=([0-9]+)$
RewriteRule ^experience\.php$ /?option=com_zoo&category_id=%1&Itemid=195&view=category

#articles
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(?:index\.php)?\?option=com_zoo&item_id=([0-9]+)&Itemid=119&view=item\ HTTP/
RewriteRule ^(index\.php)?$ /articles.php?id=%1 [R=301,L]
RewriteCond %{QUERY_STRING} ^id=([0-9]+)$
RewriteRule ^articles\.php$ /?option=com_zoo&item_id=%1&Itemid=119&view=item

#vacancy
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(?:index\.php)?\?option=com_zoo&item_id=([0-9]+)&Itemid=112&view=item\ HTTP/
RewriteRule ^(index\.php)?$ /vacancy.php?id=%1 [R=301,L]
RewriteCond %{QUERY_STRING} ^id=([0-9]+)$
RewriteRule ^vacancy\.php$ /?option=com_zoo&item_id=%1&Itemid=112&view=item

#awards
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(?:index\.php)?\?option=com_zoo&item_id=([0-9]+)&Itemid=157&view=item\ HTTP/
RewriteRule ^(index\.php)?$ /awards.php?id=%1 [R=301,L]
RewriteCond %{QUERY_STRING} ^id=([0-9]+)$
RewriteRule ^awards\.php$ /?option=com_zoo&item_id=%1&Itemid=157&view=item


#RewriteEngine on
#RewriteCond %{HTTP_USER_AGENT} iPhone
#RewriteRule .* http://i-plan.ru/iphone.html [R]




## End - Custom redirects

##
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##

# RewriteBase /

## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.

php_flag magic_quotes_gpc Off