opencart htaccess force ssl获取错误重定向循环

时间:2015-06-23 15:06:07

标签: apache .htaccess mod-rewrite ssl opencart

我已经将我的opencart配置设置为使用SSL, 当用户不在地址中使用https强制使用https

时,我想要重定向 我浏览了一下这个教程 http://www.inmotionhosting.com/support/website/ssl/how-to-force-ssl-using-the-htaccess-file

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
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]
# 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]

但是我在chrome中遇到了错误 这个网页有一个重定向循环

0 个答案:

没有答案