tearsofpleasure Posted May 5, 2025 at 01:26 AM Share Posted May 5, 2025 at 01:26 AM Приветствую. Всё работало, но пришлось привязать внутренний сайт к новому домену. И тогда вскрылось, что чпу держалось криво на изменениях как в коневом .htaccess , так и в файле .htaccess в папке движка. У меня это папка /STORE. Хотелось бы прописать один раз и верно. Пытаюсь, но пока безуспешно. Обновляю кэши, ахожу с разных устройств и браузеров. Достаточно ли просто включить в движке ocstore 1.5.5.1.2. ЧПУ в настройках и разместить стандартный .htaccess в папке, где размещён магазин ??? Во , что окаывает браерпри попытке войти по ссылкам: https://efler.ru/store/index.php?_route_=HTTP_SERVERzakaz/ хотя изначально ссылка такая: https://efler.ru/store/zakaz/ .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 "\.(tpl|ini|log)"> 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=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] 0 Quote Link to comment Share on other sites More sharing options...
Solution Tesloz Posted May 5, 2025 at 05:40 AM Solution Share Posted May 5, 2025 at 05:40 AM Не понятно, что вы хотите (ссылка https://efler.ru/store/zakaz/ - открывается нормально), но проверьте что в конфиге опенкарта(config.php) присутствует переменная HTTP_SERVER 0 Quote Link to comment Share on other sites More sharing options...
tearsofpleasure Posted May 5, 2025 at 07:38 AM Author Share Posted May 5, 2025 at 07:38 AM В 05.05.2025 в 12:40, Tesloz сказал: Не понятно, что вы хотите (ссылка https://efler.ru/store/zakaz/ - открывается нормально), но проверьте что в конфиге опенкарта(config.php) присутствует переменная HTTP_SERVER Здравствуйте, я после написания поста взял кривые конфигурации файлы .htaccess корня сайта и папки с движком. Там явно не грамотно было прописано, но работает. Хотел сделать всё верно, в одном месте прописав всё. Но пока работает, так как взял старое кривое. Если я Вам покажу оба файла, Вы сразу увидите, что это не грамотно. Даже я вижу, что это нагромождение и не то. Поэтому хотел утром по уму сделать. Но я ботаник, меня просто технический спец бросил в кризис. Вот опять сам. КОРЕНЬ HTTP: RewriteEngine On <IfModule mod_php5.c> AddType application/x-httpd-php .php .php3 .php4 .phtml .html .htm php_flag register_globals off </IfModule> RewriteBase / # Редиректы для перехода с www-адреса на простой адрес: RewriteCond %{HTTP_HOST} ^www\.(.*) [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L] # Редиректы для перехода с http-адреса на https-адрес: RewriteCond %{HTTPS} off RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Переход на подкаталог /store RewriteCond %{REQUEST_URI} !^/store RewriteRule (.*) store/$1 [R=301,L] 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] ПАПКА STORE с ocstore 1.5.5.1.2. Options +FollowSymlinks Options -Indexes <FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))"> Require all denied </FilesMatch> 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 %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css) RewriteRule ^([^?]*) store/index.php?_route_=$1 [L,QSA] 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.