trechin Опубликовано 19 мая, 2017 Жалоба Поделиться Опубликовано 19 мая, 2017 Переезжаем с Http на Https.Настроили ридирект. php_flag display_startup_errors offphp_flag display_errors offphp_flag html_errors offphp_flag log_errors onphp_flag ignore_repeated_errors offphp_flag ignore_repeated_source offphp_flag report_memleaks onphp_flag track_errors onphp_value docref_root 0php_value docref_ext 0php_value error_log /home/t/trechi/palatka-spb.ru-old/public_html/PHP_errors.logphp_value error_reporting 2047php_value log_errors_max_len 0 <Files PHP_errors.log> Order allow,deny Deny from all Satisfy All</Files>AddDefaultCharset UTF-8ErrorDocument 404 /404ErrorDocument 401 /password.phpRewriteEngine on # Админка теперь по адресу /admin# RewriteRule ^admin/?$ admin [L] # Каталог товаровRewriteRule ^catalog/([^/]+)/?$ index.php?module=ProductsView&category=$1 [L,QSA]RewriteRule ^catalog/([^/]+)/([^/]+)/?$ index.php?module=ProductsView&category=$1&brand=$2 [L,QSA] RewriteRule ^products/([^/]+)/?$ index.php?module=ProductView&product_url=$1 [L,QSA]RewriteRule ^products/?$ index.php?module=ProductsView [L,QSA] RewriteRule ^brands/([^/]+)/?$ index.php?module=ProductsView&brand=$1 [L,QSA]RewriteRule ^brands/([^/]+)/page_([^/]+)/?$ index.php?module=ProductsView&brand=$1&page=$2 [L,QSA] # Поиск товаровRewriteRule ^search/([^/]+)/?$ index.php?module=ProductsView&keyword=$1 [L,QSA]RewriteRule ^search/?$ index.php?module=ProductsView [L,QSA] # СравнениеRewriteRule ^compare/?$ index.php?module=CompareView [L,QSA]RewriteRule ^compare/([^/]+)/?$ index.php?module=CompareView&id=$1 [L,QSA]RewriteRule ^compare/delete/([^/]+)/?$ index.php?module=CompareView&id=$1&action=delete [L,QSA] # БлогRewriteRule ^blog/([^/]+)/?$ index.php?module=BlogView&url=$1 [L,QSA]RewriteRule ^blog/?$ index.php?module=BlogView [L,QSA] # Корзина и заказыRewriteRule ^cart/?$ index.php?module=CartView [L,QSA]RewriteRule ^cart/([^/]+)/?$ index.php?module=CartView&add_variant=$1 [L,QSA]RewriteRule ^cart/remove/([^/]+)/?$ index.php?module=CartView&delete_variant=$1 [L,QSA]RewriteRule ^order/([^/]+)/?$ index.php?module=OrderView&url=$1 [L,QSA]RewriteRule ^order/?$ index.php?module=OrderView [L,QSA] # Для пользователейRewriteRule ^user/login/?$ index.php?module=LoginView [L,QSA]RewriteRule ^user/register/?$ index.php?module=RegisterView [L,QSA]RewriteRule ^user/logout/?$ index.php?module=LoginView&action=logout [L,QSA]RewriteRule ^user/password_remind/?$ index.php?module=LoginView&action=password_remind [L,QSA]RewriteRule ^user/password_remind/([0-9a-z]+)/?$ index.php?module=LoginView&action=password_remind&code=$1 [L,QSA]RewriteRule ^user/?$ index.php?module=UserView [L,QSA] # Google sitemapRewriteRule ^sitemap.xml?$ sitemap.php [L,QSA] # XMLRewriteRule ^yandex.xml?$ yandex.php [L,QSA] # XMLRewriteRule ^google.xml?$ google.php [L,QSA] # feedbackRewriteRule ^contact/?$ index.php?module=FeedbackView [L,QSA] #downloadsRewriteRule ^order/([^/]+)/([^/]+)/?$ index.php?module=OrderView&url=$1&file=$2 [L,QSA] # Статические страницыRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^([^/]*)/?$ index.php?module=PageView&page_url=$1 [L,QSA]RewriteRule ^/?$ index.php?module=MainView&page_url= [L,QSA] # Ресайз картинок на летуRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^files/products/(.+) resize/resize.php?file=$1&token=%{QUERY_STRING}#RewriteCond %{THE_REQUEST} ^GET\ (.*)files/products/(.*)\?([A-z0-9]*) #RewriteRule ^files/products/(.+) resize/resize.php?file=%2&token=%3 [L,NE] # сжатие text, html, javascript, css, xml:<ifModule mod_deflate.c>AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript</ifModule> <IfModule mod_expires.c>ExpiresActive OnExpiresDefault "access 7 days"ExpiresByType application/javascript "access plus 1 year"ExpiresByType text/javascript "access plus 1 year"ExpiresByType text/css "access plus 1 year"ExpiresByType text/html "access plus 7 day"ExpiresByType text/x-javascript "access 1 year"ExpiresByType image/gif "access plus 1 year"ExpiresByType image/jpeg "access plus 1 year"ExpiresByType image/png "access plus 1 year"ExpiresByType image/jpg "access plus 1 year"ExpiresByType image/x-icon "access 1 year"ExpiresByType application/x-shockwave-flash "access 1 year"</IfModule> RewriteEngine OnRewriteCond %{SERVER_PORT} !^443$RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]Но что то пошло не так и при переадресации на главную страницу получается дополнительный /index.php?module=MainView&page_url=Подскажите пожалуйста как от него избавится????? Цитата Ссылка на сообщение Поделиться на другие сайты
daiv Опубликовано 19 мая, 2017 Жалоба Поделиться Опубликовано 19 мая, 2017 У меня так: <IfModule mod_rewrite.c> RewriteCond %{HTTPS} !=on RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L] RewriteCond %{HTTPS} !=on RewriteCond %{HTTP:X-HTTPS} !1 RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] </IfModule> Цитата Ссылка на сообщение Поделиться на другие сайты
Рекомендуемые сообщения
Присоединяйтесь к обсуждению
Вы можете написать сейчас и зарегистрироваться позже. Если у вас есть аккаунт, авторизуйтесь, чтобы опубликовать от имени своего аккаунта.