我有我的网站运行在SSL上,但我添加了一个游戏部分,使用闪存中的第三方游戏。当我启用SSL时,它停止工作。我很奇怪,如果我只能禁用该网址中包含“/ game /”的特定页面上的SSL,以便游戏正常运行。如何禁用SSL,如果一个页面url包含一个特定的字
我试图从insternet这个代码在我的.htaccess文件,但不工作:
RewriteCond %{HTTPS} off
RewriteRule ^game^ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
编辑:
我试着回答提示:
RewriteEngine On
RewriteCond %{HTTPS} On [NC]
RewriteRule ^game http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NC]
它的工作原理,但是当我去包含单词“游戏”的页面将其他页面也变成“http”,其他页面变成使用“http”而不是“https”
然后我尝试这样的:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule^https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTPS} On [NC]
RewriteRule ^game http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NC]
这它开始给我的消息“页面没有正确重定向”当我去“游戏”页面的URL。
我只希望“游戏”页面使用“http”。
编辑两个:完整的.htaccess文件
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule^https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Get rid of index.php
RewriteCond %{REQUEST_URI} /index\.php
RewriteRule (.*) index.php?rewrite=2 [L,QSA]
# Rewrite all directory-looking urls
RewriteCond %{REQUEST_URI} /$
RewriteRule (.*) index.php?rewrite=1 [L,QSA]
# Try to route missing files
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} public\/ [OR]
RewriteCond %{REQUEST_FILENAME} \.(jpg|gif|png|ico|flv|htm|html|php|css|js)$
RewriteRule . - [L]
# If the file doesn't exist, rewrite to index
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?rewrite=1 [L,QSA]
</IfModule>
# sends requests /index.php/path/to/module/ to "index.php"
# AcceptPathInfo On
# @todo This may not be effective in some cases
FileETag Size
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</IfModule>
需要帮助。如果发现任何重复,请告知我,但我找不到任何人。 谢谢。
如果您在.htaccess文章中有更多规则,请在此完成.htaccess。 – anubhava
我添加了完整的代码。 – M3Dev