Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/267.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
Php 为几个页面设置SSL_Php_Html_.htaccess_Ssl - Fatal编程技术网

Php 为几个页面设置SSL

Php 为几个页面设置SSL,php,html,.htaccess,ssl,Php,Html,.htaccess,Ssl,目前,我网站上的所有内容都重定向到https。这太棒了。我想使用ssl。但是现在,并不是所有的东西都在使用SSL,所以我想慢慢地将所有的东西传输过来。所以我想要几页register.html,register.php,textlimit.html,textlimit.php。 我们将不胜感激 我的.htaccess当前是 SetEnv TZ America/Los_Angeles # Prevent viewing of htaccess file. <Files .htaccess&g

目前,我网站上的所有内容都重定向到https。这太棒了。我想使用ssl。但是现在,并不是所有的东西都在使用SSL,所以我想慢慢地将所有的东西传输过来。所以我想要几页register.html,register.php,textlimit.html,textlimit.php。 我们将不胜感激

我的.htaccess当前是

SetEnv TZ America/Los_Angeles

# Prevent viewing of htaccess file.
<Files .htaccess>
    order allow,deny
    deny from all
</Files>

# Prevent directory listings
Options All -Indexes

# Compress text, html, javascript, css, xml:
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


RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
您可以在RewriteCond%{HTTPS}关闭的下方添加:

如果以后要添加更多内容,请使用更简单的格式:

RewriteCond %{REQUEST_URI} ^/(?:register\.html|register\.php)$ [OR]
RewriteCond %{REQUEST_URI} ^/(?:textlimit\.html|textlimit\.php)$ [OR]
RewriteCond %{REQUEST_URI} ^/other\.html$ [OR]
RewriteCond %{REQUEST_URI} ^/other2\.html$
RewriteCond %{REQUEST_URI} ^/(?:register\.html|register\.php)$ [OR]
RewriteCond %{REQUEST_URI} ^/(?:textlimit\.html|textlimit\.php)$ [OR]
RewriteCond %{REQUEST_URI} ^/other\.html$ [OR]
RewriteCond %{REQUEST_URI} ^/other2\.html$