Seoshnik

Как настроить яндекс поиск по сайту dle?

3 posts in this topic

Всем привет! Подскажите как настроить поиск по сайту используя сервис яндекс поиска ? 
дело в том я использую ЧПУ и при переходе на статическую страницу с выдачей яндекса, урезаются параметры поиска в url. 
Если отключаю ЧПУ то все работает как надо! как это обойти ?

 

Грубо говоря происходит следующее:
При переходе из формы поиска на страницу результатов, ссылка не содержит параметров запроса. Вместо /search.html?searchid=2xxxx&text=ЗАПРОС&web=0 пустой URL адрес поиска /search
как это решить ?
 
 

0

Share this post


Link to post
Share on other sites

@Seoshnik какие изменения в ДЛЕ были для разного рода редиректов, и в htaccess какие правки были?

0

Share this post


Link to post
Share on other sites

@Bestspecthebest  Вот так он сейчас выглядит :

 
Код:
RewriteEngine On

AddHandler application/x-httpd-php .html
AddHandler cgi-script .pl .py .jsp .asp .htm .shtml .sh .cgi
AddType application/x-javascript .js
AddType application/json json
AddType text/css .css
AddType text/xml .xml
AddType text/x-component .htc
AddType application/octet-stream .doc .mov .avi .pdf .xls .rar .zip .mp3 .wmv .ppt .tar .gz .docx .xlsx

AddEncoding gzip .gz
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*)$ $1.gz [QSA,L]

DirectoryIndex index.php

RewriteEngine On

RewriteRule ^f/(.*)/page/([0-9]+)(/?)$ index.php?do=filter&form_field=$1&cstart=$2 [L]
RewriteRule ^f/(.*)(/?)$ index.php?do=filter&form_field=$1 [L]

RewriteRule ^sec/([a-zA-Z0-9/\+=]+)/index.m3u8$ /player/sec.php?url=$1&index=true [L]
RewriteRule ^sec/([a-zA-Z0-9/\+=]+).segment([0-9]+).ts$ /player/sec.php?url=$1&segment=$2&ts=true [L]

RewriteRule ^embed/([0-9]+)/$ /player/get.php?embed=$1 [L]
RewriteRule ^video/([^/]+)/([^/]+)/([0-9]+)/manifest.f4m$ /player/get.php?token=$1&json=$2&f4m=$3 [L]
RewriteRule ^video/([^/]+)/([^/]+)/([0-9]+)/index.m3u8$ /player/get.php?token=$1&json=$2&m3u8=$3 [L]

# Редиректы
RewriteRule ^page/([0-9]+)(/?)$ index.php?cstart=$1 [L]

# Актеры
RewriteRule ^actor(/?)$ index.php?do=actor [L]
RewriteRule ^actor/([0-9]+)(/?)+$ index.php?do=actor&id=$1 [L]
RewriteRule ^actor/page/([0-9]+)(/?)+$ index.php?do=actor&cstart=$1 [L]
RewriteRule ^actor/([0-9]+)/page/([0-9]+)(/?)+$ index.php?do=actor&id=$1&cstart=$2 [L]

# Коллекции
RewriteRule ^collections(/?)$ index.php?do=collections [L]
RewriteRule ^collections/page/([0-9]+)(/?)+$ index.php?do=collections&cstart=$1 [L]
RewriteRule ^collections/user/([0-9]+)(/?)+$ index.php?do=collections&user=$1 [L]
RewriteRule ^collections/user/([0-9]+)/page/([0-9]+)(/?)+$ index.php?do=collections&user=$1&cstart=$2 [L]
RewriteRule ^collections/([^/]*)(/?)+$ index.php?do=collections&name=$1 [L]
RewriteRule ^collections/([^/]*)/page/([0-9]+)(/?)+$ index.php?do=collections&name=$1&cstart=$2 [L]

RewriteRule ^add_collections.html$ index.php?do=add_collections [L]
RewriteRule ^add_collections.html/([^/]*)(/?)+$ index.php?do=add_collections&action=$1 [L]
RewriteRule ^add_collections.html/([0-9]+)/([^/]*)(/?)+$ index.php?do=add_collections&id=$1&action=$2 [L]

# Сам пост
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),([0-9]+),(.*).html$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&cstart=$5&news_name=$6&seourl=$6 [L]
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/page,([0-9]+),(.*).html$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 [L]
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/print:page,([0-9]+),(.*).html$ engine/print.php?subaction=showfull&year=$1&month=$2&day=$3&news_page=$4&news_name=$5&seourl=$5 [L]
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*).html$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4 [L]

RewriteRule ^([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html$ index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 [L]
RewriteRule ^([^.]+)/page,([0-9]+),([0-9]+)-(.*).html$ index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 [L]
RewriteRule ^([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html$ engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 [L]
RewriteRule ^([^.]+)/([0-9]+)-(.*).html$ index.php?newsid=$2&seourl=$3&seocat=$1 [L]

RewriteRule ^page,([0-9]+),([0-9]+),([0-9]+)-(.*).html$ index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 [L]
RewriteRule ^page,([0-9]+),([0-9]+)-(.*).html$ index.php?newsid=$2&news_page=$1&seourl=$3 [L]
RewriteRule ^print:page,([0-9]+),([0-9]+)-(.*).html$ engine/print.php?news_page=$1&newsid=$2&seourl=$3 [L]
RewriteRule ^([0-9]+)-(.*).html$ index.php?newsid=$1&seourl=$2 [L]

# За день
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$ index.php?year=$1&month=$2&day=$3 [L]
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$ index.php?year=$1&month=$2&day=$3&cstart=$4 [L]
# За весь месяц
RewriteRule ^([0-9]{4})/([0-9]{2})(/?)+$ index.php?year=$1&month=$2 [L]
RewriteRule ^([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$ index.php?year=$1&month=$2&cstart=$3 [L]
# Вывод за весь год
RewriteRule ^([0-9]{4})(/?)+$ index.php?year=$1 [L]
RewriteRule ^([0-9]{4})/page/([0-9]+)(/?)+$ index.php?year=$1&cstart=$2 [L]
# вывод отдельному тегу
RewriteRule ^tags/([^/]*)(/?)+$ index.php?do=tags&tag=$1 [L]
RewriteRule ^tags/([^/]*)/page/([0-9]+)(/?)+$ index.php?do=tags&tag=$1&cstart=$2 [L]
# поиск по доп полям
RewriteRule ^xfsearch/([^.]+)/?$ index.php?do=xfsearch&xf=$1 [L]
RewriteRule ^xfsearch/([^.]+)/page/([0-9]+)(/?)+$ index.php?do=xfsearch&xf=$1&cstart=$2 [L]
# вывод для отдельного юзера
RewriteRule ^user/([^/]*)/rss.xml$ engine/rss.php?subaction=allnews&user=$1 [L]
RewriteRule ^user/([^/]*)(/?)+$ index.php?subaction=userinfo&user=$1 [L]
RewriteRule ^user/([^/]*)/page/([0-9]+)(/?)+$ index.php?subaction=userinfo&user=$1&cstart=$2 [L]
RewriteRule ^user/([^/]*)/news(/?)+$ index.php?subaction=allnews&user=$1 [L]
RewriteRule ^user/([^/]*)/news/page/([0-9]+)(/?)+$ index.php?subaction=allnews&user=$1&cstart=$2 [L]
RewriteRule ^user/([^/]*)/news/rss.xml(/?)+$ engine/rss.php?subaction=allnews&user=$1 [L]
# вывод всех последних новостей
RewriteRule ^lastnews(/?)+$ index.php?do=lastnews [L]
RewriteRule ^lastnews/page/([0-9]+)(/?)+$ index.php?do=lastnews&cstart=$1 [L]
# вывод в виде каталога
RewriteRule ^catalog/([^/]*)/rss.xml$ engine/rss.php?catalog=$1 [L]
RewriteRule ^catalog/([^/]*)(/?)+$ index.php?catalog=$1 [L]
RewriteRule ^catalog/([^/]*)/page/([0-9]+)(/?)+$ index.php?catalog=$1&cstart=$2 [L]
# вывод непрочитанных статей
RewriteRule ^newposts(/?)+$ index.php?subaction=newposts [L]
RewriteRule ^newposts/page/([0-9]+)(/?)+$ index.php?subaction=newposts&cstart=$1 [L]
# вывод избранных статей
RewriteRule ^favorites(/?)+$ index.php?do=favorites [L]
RewriteRule ^favorites/page/([0-9]+)(/?)+$ index.php?do=favorites&cstart=$1 [L]

RewriteRule ^rules.html$ index.php?do=rules [L]
RewriteRule ^statistics.html$ index.php?do=stats [L]
RewriteRule ^addnews.html$ index.php?do=addnews [L]
RewriteRule ^rss.xml$ engine/rss.php [L]
RewriteRule ^sitemap.xml$ uploads/sitemap.xml [L]




RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^.]+)/page/([0-9]+)(/?)+$ index.php?do=cat&category=$1&cstart=$2 [L]
RewriteRule ^([^.]+)/?$ index.php?do=cat&category=$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^.]+)/rss.xml$ engine/rss.php?do=cat&category=$1 [L]
RewriteRule ^page,([0-9]+),([^/]+).html$ index.php?do=static&page=$2&news_page=$1&seourl=$2 [L]
RewriteRule ^print:([^/]+).html$ engine/print.php?do=static&page=$1&seourl=$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+).html$ index.php?do=static&page=$1&seourl=$1 [L]




<ifModule mod_gzip.c>
  mod_gzip_on Yes
  mod_gzip_dechunk Yes
  mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
  mod_gzip_item_include handler ^cgi-script$
  mod_gzip_item_include mime ^text/.*
  mod_gzip_item_include mime ^application/x-javascript.*
  mod_gzip_item_exclude mime ^image/.*
  mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>

<IfModule mod_expires.c>
  ExpiresActive on

# Your document html
  ExpiresByType text/html "access plus 600 seconds"

# Media: images, video, audio
  ExpiresByType audio/ogg "access plus 1 month"
  ExpiresByType image/gif "access plus 1 month"
  ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
  ExpiresByType image/png "access plus 1 month"
  ExpiresByType video/mp4 "access plus 1 month"
  ExpiresByType video/ogg "access plus 1 month"
  ExpiresByType video/webm "access plus 1 month"

# CSS and JavaScript
  ExpiresByType application/javascript "access plus 1 year"
  ExpiresByType text/css "access plus 1 year"
</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/css "access plus 604800 seconds"
    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"
    ExpiresByType text/woff "access plus 43200 seconds"
    # Включаем кэширование xml файлов на десять минут
    ExpiresByType application/xhtml+xml "access plus 600 seconds"
</ifModule>

Order allow,Deny
allow from all

#COPYRIGHTERS
RewriteCond %{HTTP_REFERER} .*storm\.assa\.pro.*$ [OR]
RewriteCond %{HTTP_REFERER} .*content-watch.*$ [OR]
RewriteCond %{HTTP_REFERER} .*text\.ru\.*$ [OR]
RewriteCond %{HTTP_REFERER} .*policeweb.*$ [OR]
RewriteCond %{HTTP_REFERER} .*webkontrol.*$ [OR]
RewriteCond %{HTTP_REFERER} .*ruprotect.*$ [OR]
RewriteCond %{HTTP_REFERER} .*promdex.*$ [OR]
RewriteCond %{HTTP_REFERER} .*scan-web.*$ [OR]
RewriteCond %{HTTP_REFERER} .*infopolice.*$ [OR]
RewriteCond %{HTTP_REFERER} .*audiolock.*$
RewriteCond %{REQUEST_URI} !^.*/error\.php.*$
RewriteRule ^(.*)$ /error.php?url=$1 [R,L=404]
 
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now