Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess 在所有页面上使用HTTPS的Magento_.htaccess_Http_Magento_Mod Rewrite_Https - Fatal编程技术网

.htaccess 在所有页面上使用HTTPS的Magento

.htaccess 在所有页面上使用HTTPS的Magento,.htaccess,http,magento,mod-rewrite,https,.htaccess,Http,Magento,Mod Rewrite,Https,我在我的网站www.bambinies.co.uk上获得了SSL 我只希望签出页面需要https,目前我在使用不安全的基本url http的每个页面上都会收到500个内部服务器错误 我认为我的.htaccess强制每个页面都有https路径,下面是文件: RewriteCond %{HTTP_USER_AGENT} MJ12bot RewriteRule .* - [F] RewriteCond %{HTTP_USER_AGENT} 80legs [NC] RewriteRule ^ - [F]

我在我的网站www.bambinies.co.uk上获得了SSL

我只希望签出页面需要https,目前我在使用不安全的基本url http的每个页面上都会收到500个内部服务器错误

我认为我的.htaccess强制每个页面都有https路径,下面是文件:

RewriteCond %{HTTP_USER_AGENT} MJ12bot
RewriteRule .* - [F]
RewriteCond %{HTTP_USER_AGENT} 80legs [NC]
RewriteRule ^ - [F]

AddType image/svg+xml svg svgz
AddEncoding gzip svgz
AddType text/x-component .htc
DirectoryIndex index.php 

php_value memory_limit 512M 
php_value max_execution_time 18000 
php_flag magic_quotes_gpc off 
php_flag session.auto_start off 
php_flag suhosin.session.cryptua off 
php_flag zend.ze1_compatibility_mode Off 

如何将站点设置为不在所有页面上使用https?

请按照以下步骤为所有页面使用活动https

Step1: change the base secure and unsecure url from  admin>system>Configuration>General>Unsecure and Secure to https://www.bambinies.co.uk 
Step2:Use Secure URLs in Frontend makes yes under secure tab
Step3: add the below code  in htaccess file

    RewriteCond %{SERVER_PORT} 80 
   RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,L]
    after RewriteEngine on

基本URL有两种类型。安全的和不安全的。似乎您已经为正常或不安全的url添加了https。请检查您的管理面板或db table core\u config\u数据。

在所有页面上使用https有什么问题?我不知道有一个?但我无法解决如何强制其他页面使用https,我想我可以更改基本url?好吧,这是另一个问题。我帮不上忙,但你可能会得到答案
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
Header append Vary User-Agent env=!dont-vary
php_flag zlib.output_compression on
SetOutputFilter DEFLATE 

SSLOptions StdEnvVars 
Header unset ETag
Header unset Last-Modified

SecFilterEngine Off 
SecFilterScanPOST Off

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
Header append Vary User-Agent env=!dont-vary
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.* 

ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 216000 seconds"
ExpiresByType application/x-javascript "access plus 216000 seconds"

AddType audio/mp4 m4a f4a f4b
AddType audio/ogg oga ogg

AddType application/javascript                      js jsonp
AddType application/json                            json

AddType video/mp4                                   mp4 m4v f4v f4p
AddType video/ogg                                   ogv
AddType video/webm                                  webm
AddType video/x-flv                                 flv

AddType application/font-woff                       woff
AddType application/vnd.ms-fontobject               eot                         
AddType application/x-font-ttf                      ttc ttf
AddType font/opentype                               otf

AddType application/octet-stream                    safariextz
AddType application/x-chrome-extension              crx
AddType application/x-opera-extension               oex
AddType application/x-shockwave-flash               swf
AddType application/x-web-app-manifest+json         webapp
AddType application/x-xpinstall                     xpi
AddType application/xml                             atom rdf rss xml
AddType image/webp                                  webp
AddType image/x-icon                                ico
AddType text/cache-manifest                         appcache manifest
AddType text/vtt                                    vtt
AddType text/x-component                            htc
AddType text/x-vcard                                vcf
AddCharset utf-8 .atom .css .js .json .rss .vtt .webapp .xml

FileETag None

AddDefaultCharset Off
#AddDefaultCharset UTF-8

BrowserMatch MSIE best-standards-support
Header set X-UA-Compatible IE=8 env=best-standards-support

Order allow,deny
Allow from all
Step1: change the base secure and unsecure url from  admin>system>Configuration>General>Unsecure and Secure to https://www.bambinies.co.uk 
Step2:Use Secure URLs in Frontend makes yes under secure tab
Step3: add the below code  in htaccess file

    RewriteCond %{SERVER_PORT} 80 
   RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,L]
    after RewriteEngine on