Jump to content

Recommended Posts

Здравствуйте! 

Хочется сделать красивую ссылку на товар, но так, что бы название производителя вписывалось до домена. 

подскажите, через что возможно это реализовать? через htaccess? 

 

для наглядности:

было например

http://site.ru/... и если выбирается определенный производитель- например bmw

 

стало 

 

http://bmw.site.ru/...

Edited by natahamray1995

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By NikRestore
      Здравствуйте. Проблема в следующем: Не могу понять, что не так в htaccess - При клике на любую страницу идет переадресация на главную. В чем может быть дело?
      ocStore 2.3.0.2.3.
      SEO URL + SeoPro (ЧПУ). Без SeoPro тоже самое получается.
      SSL заказал у хостера, подключил, в Настройках включил.
      Переадресация с http://domain.com/ на https://domain.com/ осуществляется функцией хостинга.
      В конфигах корня и админа прописал:
      //HTTP define('HTTP_SERVER', 'http://www.domain.com/'); //HTTPS define('HTTPS_SERVER', 'https://www.domain.com/'); .htaccess. Закомментированная строчка должна была делать редирект с обычных урлов на сеошные урлы. Но при ее активации, просто падают стили.
      RewriteEngine ON RewriteBase / RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L] RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L] RewriteRule ^system/download/(.*) index.php?route=error/not_found [L] RewriteCond %{HTTPS} OFF RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule .* http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] RewriteCond %{HTTPS} ON RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !\/$ RewriteCond %{REQUEST_URI} !\/[^\/]*\.[^\/]+$ RewriteRule .* http://%{HTTP_HOST}%{REQUEST_URI}/ [L,R=301] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !\/$ RewriteCond %{REQUEST_URI} !\/[^\/]*\.[^\/]+$ RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI}/ [L,R=301] # RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] <Files .htaccess> Order Allow, Deny Deny from All </Files> Options All -Indexes  
    • By yurabr
      Здравствуйте.
      Вот, что у меня в htaccess:
      RewriteEngine On RewriteBase / #Редирект с www to non-www(https) RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L] #Редирект с http to https RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} ^(.+)/$ RewriteRule ^(.+)/$ /$1 [R=301,L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\ HTTP/ RewriteRule ^index\.html$ / [R=301,L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/ RewriteRule ^index\.php$ / [R=301,L] RewriteCond %{QUERY_STRING} ^route=common/home$ RewriteCond %{REQUEST_METHOD} !^POST$ RewriteRule ^index\.php$ https://%{HTTP_HOST}? [R=301,L] RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L] RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L] RewriteRule ^download/(.*) /index.php?route=error/not_found [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css) RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] Больше там ничего нет.
      Я, в принципе, не уверен, что он правильный (может кто подправит).
      проверял здесь http://www.prcy-info.ru/index.php/redirect-checker 
      1)
      Ссылка: https://мойсайт.ком/каталог
      Обнаружен 301 редирект на URL: https://мойсайт.ком/каталог 
      Это ТАК должно работать?
      2) 
      Ссылка: https://www.мойсайт.ком/каталог/
      Обнаружен 301 редирект на URL: https://мойсайт.ком/каталог/
      В других случаях слеш убирается, почему не убирается тут?
       
      Спасибо.
       
       
    • By Dzimmo
      Всем привет! Прошу помощи:
      сайт: http://r40271.hostde13.fornex.org/lauterpro/
      Не работают ЧПУ в стандартной версии магазина. В админке ЧПУ включены и прописаны для категорий.
      При переходе на категорию с прописанным url (http://r40271.hostde13.fornex.org/lauterpro/polotenca) как и положено вставляется ЧПУ, но сервер не заменяет ЧПУ на правильный URL, а выдает 404 ошибку. Перепробовал все варианты, которые нашел на форуме, кэш system/storage/cache удалял. 
      Содержание файла .htaccess:
      # 1.To use URL Alias you need to be running apache with mod_rewrite enabled. # 2. In your opencart directory rename htaccess.txt to .htaccess. # For any support issues please visit: http://www.opencart.com Options +SymLinksIfOwnerMatch # Prevent Directoy listing Options -Indexes # Prevent Direct Access to files <FilesMatch "(?i)((\.tpl|.twig|\.ini|\.log|(?<!robots)\.txt))">  Require all denied ## For apache 2.2 and older, replace "Require all denied" with these two lines : # Order deny,allow # Deny from all </FilesMatch> # SEO URL Settings RewriteEngine On # If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/ RewriteBase / RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L] RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L] RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css) RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] ### Additional Settings that may need to be enabled for some servers ### Uncomment the commands by removing the # sign in front of it. ### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that. # 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it: # php_flag register_globals off # 2. If your cart has magic quotes enabled, This may work to disable it: # php_flag magic_quotes_gpc Off # 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try # php_value upload_max_filesize 999M # 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields # php_value post_max_size 999M # 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields # php_value max_execution_time 200 # 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields # php_value max_input_time 200 # 7. disable open_basedir limitations # php_admin_value open_basedir none  
    • By Yarilo
      Может кто мопочь разобраться с htaccess 
      Иногда ПС в индекс выдают страницы от старого сайта (другая структура) до смены CMS и т.д.
      И через день-два появляется ссылка 404 формата /index.php?_route_=product/quick-204h-esd-analogovaja-indukcionnaja-pajalnaja-stancija/page33/
      Красным выделил стандартный обработчик opancarta, а синим древнюю ссылку. Поидее она должна быть в
      виде moysait.ru/quick-204h-esd-analogovaja-indukcionnaja-pajalnaja-stancija/page33/ и выводить страница не найдена
      Но почему-то между доменом сайта и ссылкой появляется /index.php?_route_=product
       
       
    • By alex380
      Здравствуйте, после настройки файла htaccess не обновляются модификаторы, когда привожу его в прежний вид, всё обновляется. Подскажите, где я накосячил
      # 1.To use URL Alias you need to be running apache with mod_rewrite enabled. # 2. In your opencart directory rename htaccess.txt to .htaccess. # For any support issues please visit: http://www.opencart.com Options +FollowSymlinks # Prevent Directoy listing Options -Indexes # Prevent Direct Access to files <FilesMatch "(?i)((\.tpl|.twig|\.ini|\.log|(?<!robots)\.txt))"> Require all denied ## For apache 2.2 and older, replace "Require all denied" with these two lines : # Order deny,allow # Deny from all </FilesMatch> # SEO URL Settings RewriteEngine On # If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/ RewriteBase / RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L] RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L] RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css) RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.(php|html|htm)\ HTTP/ RewriteRule ^(.*)index\.(php|html|htm)$ $1 [R=301,L] RewriteCond %{HTTP_HOST} !^vodadarlife.ru$ [NC] RewriteRule ^(.*)$ http://vodadarlife.ru/$1 [R=301,L] ### Additional Settings that may need to be enabled for some servers ### Uncomment the commands by removing the # sign in front of it. ### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that. # 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it: # php_flag register_globals off # 2. If your cart has magic quotes enabled, This may work to disable it: # php_flag magic_quotes_gpc Off # 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try # php_value upload_max_filesize 999M # 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields # php_value post_max_size 999M # 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields # php_value max_execution_time 200 # 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields # php_value max_input_time 200 # 7. disable open_basedir limitations # php_admin_value open_basedir none # Кеш и сжатие <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE text/css <IfModule mod_setenvif.c> BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html </IfModule> </IfModule> # Кеш <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType text/html "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 1 month" </IfModule> RewriteEngine On RewriteBase / RewriteCond %{QUERY_STRING} ^_route_=burenie-na-vodu/razreshenie-na-burenie-skvazhiny$ RewriteRule ^(.*)$ http://vodadarlife.ru/razreshenie-na-burenie-skvazhiny? [R=301,L] RewriteCond %{QUERY_STRING} ^_route_=burenie-na-vodu/artezianskaja-skvazhina$ RewriteRule ^(.*)$ http://vodadarlife.ru/artezianskaja-skvazhina? [R=301,L] RewriteCond %{QUERY_STRING} ^_route_=burenie-na-vodu/abissinskaja-skvazhina$ RewriteRule ^(.*)$ http://vodadarlife.ru/abissinskaja-skvazhina? [R=301,L] RewriteCond %{QUERY_STRING} ^_route_=burenie-na-vodu/skvazhina-na-pesok$ RewriteRule ^(.*)$ http://vodadarlife.ru/skvazhina-na-pesok? [R=301,L] RewriteCond %{QUERY_STRING} ^_route_=burenie-na-vodu/kak-prochistit-skvazhinu-svoimi-rukami$ RewriteRule ^(.*)$ http://vodadarlife.ru/kak-prochistit-skvazhinu-svoimi-rukami? [R=301,L] RewriteCond %{QUERY_STRING} ^_route_=burenie-na-vodu/skvazhina-na-vodu-svoimi-rukami$ RewriteRule ^(.*)$ http://vodadarlife.ru/skvazhina-na-vodu-svoimi-rukami? [R=301,L] RewriteCond %{QUERY_STRING} ^_route_=kontakty$ RewriteRule ^(.*)$ http://vodadarlife.ru/contact? [R=301,L] RewriteCond %{QUERY_STRING} ^_route_=video RewriteRule ^(.*)$ http://vodadarlife.ru? [R=301,L] RewriteCond %{QUERY_STRING} ^_route_=foto-nacha-rabota$ RewriteRule ^(.*)$ http://vodadarlife.ru? [R=301,L] RewriteCond %{QUERY_STRING} ^_route_=burenie-na-vodu/storony-skvazhin$ RewriteRule ^(.*)$ http://vodadarlife.ru? [R=301,L] RewriteCond %{QUERY_STRING} ^_route_=burenie-na-vodu/vopros-otvet$ RewriteRule ^(.*)$ http://vodadarlife.ru? [R=301,L] RewriteCond %{QUERY_STRING} ^_route_=burenie-na-vodu$ RewriteRule ^(.*)$ http://vodadarlife.ru? [R=301,L] ## Блокировка по USER AGENT: RewriteCond %{HTTP_USER_AGENT} FlipboardProxy [OR] RewriteCond %{HTTP_USER_AGENT} LinkpadBot [OR] RewriteCond %{HTTP_USER_AGENT} BLEXBot [OR] RewriteCond %{HTTP_USER_AGENT} Detectify [OR] RewriteCond %{HTTP_USER_AGENT} trovitBot [OR] RewriteCond %{HTTP_USER_AGENT} aiHitBot [OR] RewriteCond %{HTTP_USER_AGENT} Riddler [OR] RewriteCond %{HTTP_USER_AGENT} SemrushBot [OR] RewriteCond %{HTTP_USER_AGENT} MJ12bot [OR] RewriteCond %{HTTP_USER_AGENT} MegaIndex.ru [OR] RewriteCond %{HTTP_USER_AGENT} bingbot [OR] RewriteCond %{HTTP_USER_AGENT} AhrefsBot [OR] RewriteCond %{HTTP_USER_AGENT} Java [OR] RewriteCond %{HTTP_USER_AGENT} NjuiceBot [OR] RewriteCond %{HTTP_USER_AGENT} Gigabot [OR] RewriteCond %{HTTP_USER_AGENT} Baiduspider [OR] RewriteCond %{HTTP_USER_AGENT} JS-Kit [OR] RewriteCond %{HTTP_USER_AGENT} Voyager [OR] RewriteCond %{HTTP_USER_AGENT} PostRank [OR] RewriteCond %{HTTP_USER_AGENT} PycURL [OR] RewriteCond %{HTTP_USER_AGENT} Aport [OR] RewriteCond %{HTTP_USER_AGENT} ia_archiver [OR] RewriteCond %{HTTP_USER_AGENT} DotBot [OR] RewriteCond %{HTTP_USER_AGENT} SurveyBot [OR] RewriteCond %{HTTP_USER_AGENT} larbin [OR] RewriteCond %{HTTP_USER_AGENT} Butterfly [OR] RewriteCond %{HTTP_USER_AGENT} libwww [OR] RewriteCond %{HTTP_USER_AGENT} Wget [OR] RewriteCond %{HTTP_USER_AGENT} SWeb [OR] RewriteCond %{HTTP_USER_AGENT} LinkExchanger [OR] RewriteCond %{HTTP_USER_AGENT} Soup [OR] RewriteCond %{HTTP_USER_AGENT} WordPress [OR] RewriteCond %{HTTP_USER_AGENT} PHP/ [OR] RewriteCond %{HTTP_USER_AGENT} spbot [OR] RewriteCond %{HTTP_USER_AGENT} MLBot [OR] RewriteCond %{HTTP_USER_AGENT} InternetSeer [OR] RewriteCond %{HTTP_USER_AGENT} FairShare [OR] RewriteCond %{HTTP_USER_AGENT} Yeti [OR] RewriteCond %{HTTP_USER_AGENT} Birubot [OR] RewriteCond %{HTTP_USER_AGENT} YottosBot [OR] RewriteCond %{HTTP_USER_AGENT} gold\ crawler [OR] RewriteCond %{HTTP_USER_AGENT} Linguee [OR] RewriteCond %{HTTP_USER_AGENT} Ezooms [OR] RewriteCond %{HTTP_USER_AGENT} lwp-trivial [OR] RewriteCond %{HTTP_USER_AGENT} Purebot [OR] RewriteCond %{HTTP_USER_AGENT} User-Agent [OR] RewriteCond %{HTTP_USER_AGENT} kmSearchBot [OR] RewriteCond %{HTTP_USER_AGENT} SiteBot [OR] RewriteCond %{HTTP_USER_AGENT} CamontSpider [OR] RewriteCond %{HTTP_USER_AGENT} ptd-crawler [OR] RewriteCond %{HTTP_USER_AGENT} HTTrack [OR] RewriteCond %{HTTP_USER_AGENT} suggybot [OR] RewriteCond %{HTTP_USER_AGENT} ttCrawler [OR] RewriteCond %{HTTP_USER_AGENT} Nutch [OR] RewriteCond %{HTTP_USER_AGENT} Zeus RewriteRule ^(.*)$ – [F,L]
  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.