- Автор темы
- #1
При добавлении в URL произвольной метки, например, mysite.ru/?openstat=123 или mysite.ru/?yclid=123456 (метка Яндекс.Метрики) отдается страница 404 ошибки.
Как разрешить произвольные параметры в урле?
Вот содержимое .htaccess
Как разрешить произвольные параметры в урле?
Вот содержимое .htaccess
Код:
Options -Indexes +FollowSymLinks
AddDefaultCharset utf-8
#php_value error_reporting E_NONE
<FilesMatch "\.(class|functions|inc|modules|templates|templates_c|cache|lib)$">
Order allow,deny
</FilesMatch>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 60 minutes"
ExpiresByType text/html "now"
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^home.html$ / [R=301,L]
# RewriteCond %{REQUEST_URI} !^/robots\.txt$ [NC]
# RewriteCond %{HTTP_HOST} !^www\. [NC]
# RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [QSA,L]
RewriteCond %{REQUEST_URI} !^/(class|functions|inc|modules|templates|templates_c|cache)/
RewriteRule ^(shop|forums|download|guestbook|roadmap)-([0-9]+).html$ index.php?module=$1&page=$2 [QSA,L]
RewriteRule ^(shop|forums|download|guestbook|roadmap)-print.html$ index.php?module=$1&print=1 [QSA,L]
RewriteRule ^(shop|forums|download|guestbook|roadmap).html$ index.php?module=$1 [QSA,L]
## Downloads
RewriteRule ^download-([0-9]+)-([0-9]+).html$ index.php?module=download&action=showfile&file_id=$1&categ=$2
RewriteRule ^download-([0-9]+)-([0-9]+)-print.html$ index.php?module=download&action=showfile&file_id=$1&categ=$2&print=1
RewriteRule ^download_file-([0-9]+)-([_a-zA-Z0-9]+).html$ index.php?module=download&action=get_file&file_id=$1&pop=1&cp_theme=$2
RewriteRule ^nopay_file-([0-9]+)-([_a-zA-Z0-9]+).html$ index.php?module=download&action=get_nopay_file&file_id=$1&pop=1&cp_theme=$2
RewriteRule ^notmine_file-([0-9]+)-([_a-zA-Z0-9]+).html$ index.php?module=download&action=get_notmine_file&file_id=$1&pop=1&cp_theme=$2
RewriteRule ^nouserpay_file-([0-9,]+)-([0-9]+)-([0-9]+)-([_a-zA-Z0-9]+).html$ index.php?module=download&action=get_nouserpay_file&diff=$1&val=$2&file_id=$3&pop=1&cp_theme=$4
RewriteRule ^download_kategorie-([0-9]+)-([0-9]+)-([0-9]+)-([a-zA-Z0-9-]+)-page([0-9]+)-order([_a-zA-Z0-9]+).html$ index.php?module=download&categ=$1&parent=$2&navop=$3&c=$4&page=$5&orderby=$6
RewriteRule ^download_kategorie-([0-9]+)-([0-9]+)-([0-9]+)-([a-zA-Z0-9-]+)-page([0-9]+).html$ index.php?module=download&categ=$1&parent=$2&navop=$3&c=$4&page=$5
RewriteRule ^download_kategorie-([0-9]+)-([0-9]+)-([0-9]+)-([a-zA-Z0-9-]+).html$ index.php?module=download&categ=$1&parent=$2&navop=$3&c=$4
RewriteRule ^pay-([0-9,]+)-([_a-zA-Z0-9]+).html$ index.php?module=download&action=pay&file_id=$1&pop=0&cp_theme=$2
RewriteRule ^toreg-([0-9,]+)-([_a-zA-Z0-9]+).html$ index.php?module=download&action=toreg&file_id=$1&pop=1&cp_theme=$2
RewriteRule ^denied-([0-9,]+)-([_a-zA-Z0-9]+).html$ index.php?module=download&action=get_denied&file_id=$1&pop=1&cp_theme=$2
## Shop
RewriteRule ^product-([0-9]+)-([0-9]+)-([0-9]+).html$ index.php?module=shop&action=product_detail&product_id=$1&categ=$2&navop=$3 [QSA,L]
RewriteRule ^product-([0-9]+)-([0-9]+)-([0-9]+)-print.html$ index.php?module=shop&action=product_detail&product_id=$1&categ=$2&navop=$3&print=1 [QSA,L]
RewriteRule ^category-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html$ index.php?module=shop&categ=$1&parent=$2&navop=$3&page=$4 [QSA,L]
RewriteRule ^category-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-print.html$ index.php?module=shop&categ=$1&parent=$2&navop=$3&page=$4&print=1 [QSA,L]
RewriteRule ^category-([0-9]+)-([0-9]+)-([0-9]+).html$ index.php?module=shop&categ=$1&parent=$2&navop=$3 [QSA,L]
RewriteRule ^category-([0-9]+)-([0-9]+)-([0-9]+)-print.html$ index.php?module=shop&categ=$1&parent=$2&navop=$3&print=1 [QSA,L]
RewriteRule ^basket.html$ index.php?module=shop&action=showbasket [QSA,L]
RewriteRule ^basket-print.html$ index.php?module=shop&action=showbasket&print=1 [QSA,L]
RewriteRule ^manufacturer-([0-9]+).html$ index.php?module=shop&manufacturer=$1 [QSA,L]
RewriteRule ^manufacturer-([0-9]+).html&page=([0-9]+)$ index.php?module=shop&manufacturer=$1&page=$2 [QSA,L]
RewriteRule ^manufacturer-print.html$ index.php?module=shop&manufacturer=$1&print=1 [QSA,L]
RewriteRule ^checkout.html$ index.php?module=shop&action=checkout [QSA,L]
RewriteRule ^checkout-print.html$ index.php?module=shop&action=checkout&print=1 [QSA,L]
RewriteRule ^my-downloads.html$ index.php?module=shop&action=mydownloads [QSA,L]
RewriteRule ^request.html$ index.php?module=shop&action=myorders&sub=request [QSA,L]
RewriteRule ^my-orders.html$ index.php?module=shop&action=myorders [QSA,L]
RewriteRule ^wishlist-refresh.html$ index.php?module=shop&action=wishlist&refresh=1 [QSA,L]
RewriteRule ^wishlist.html$ index.php?module=shop&action=wishlist&pop=1 [QSA,L]
RewriteRule ^datainf.html$ index.php?module=shop&action=infopage&page=datainf [QSA,L]
RewriteRule ^shippinginf.html$ index.php?module=shop&action=infopage&page=shippinginf [QSA,L]
RewriteRule ^shop-about.html$ index.php?module=shop&action=infopage&page=imprint [QSA,L]
RewriteRule ^agb.html$ index.php?module=shop&action=infopage&page=agb [QSA,L]
RewriteRule ^getfile-([0-9]+)-([\x21-\xFF]+).html$ index.php?module=shop&action=mydownloads&sub=getfile&Id=$1&FileId=$2&getId=$1 [QSA,L]
## Yandex Market
RewriteRule ^market.xml$ inc/yandex.php [QSA,L]
RewriteRule ^sitemap.xml$ inc/sitemap.php [QSA,L]
## Poll
RewriteRule ^poll-([0-9]+).html$ index.php?module=poll&action=result&pid=$1
RewriteRule ^pollcomment-([0-9]+).html$ index.php?module=poll&action=form&pop=1&pid=$1
RewriteRule ^poll-archive.html$ index.php?module=poll&action=archive
## RSS
RewriteRule ^rss/rss-([0-9]+).xml$ inc/rss.php?id=$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>