URLルーティングでcodeigniterを使用します。httpをCodeIgniterの複雑さでhttpsに移動するためのhtaccessコード
httpからhttpsに移行したいと考えています。
RewriteEngine On
RewriteCond %{HTTP_HOST} !^eternalcitytours\.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^XXX\.XXX\.XXX\.XXX [NC]
RewriteRule ^(.*)$ http://eternalcitytours.com/$1 [R=301,L]
<IfModule mod_rewrite.c>
# Development
RewriteEngine On
RewriteBase/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|images|scripts|styles|vendor|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
HTTP上の罰金以上の作品:
これが私の現在の.htaccessコードです。トラフィックを着信すると、HTTPから私に来るたび
- :私は2の問題を取得して、しかし
RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule .* https://eternalcitytours.com/%{REQUEST_URI} [R,L] RewriteEngine On RewriteCond %{HTTP_HOST} !^eternalcitytours\.com$ [NC,OR] RewriteCond %{HTTP_HOST} ^037\.061\.237\.216 [NC] RewriteRule ^(.*)$ https://eternalcitytours.com/$1 [R=301,L] <IfModule mod_rewrite.c> # Development RewriteEngine On RewriteBase/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond $1 !^(index\.php|images|scripts|styles|vendor|robots\.txt) RewriteRule ^(.*)$ index.php/$1 [L] </IfModule> DirectoryIndex index.php RewriteEngine on RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
上記のコードdoesntの仕事を:httpsに行くために
は私がすること
.htaccess
を変更しましたリンクには、結果として得られるURLに余分なものがあります。例https://eternalcitytours.com//en/5/About-Eternal-City-Toursの代わりにhttps://eternalcitytours.com/en/5/About-Eternal-City-Tours - 誰かがhttps://WWW.eternalcitytours.comを持っていれば、ページは読み込まれずにエラーが発生します。 (
ERR_SSL_PROTOCOL_ERROR
)
私の正直なところ私がやっていることは分かっていないので、誰かが私の.htaccessコードを手伝ってくれますか?あなたはhttp -> https
ためにこのルールを使用する必要が
おかげ
こんにちはanabhava、prob1が解決しました。どうも。 prob 2について言えば、SSL証明書がWWW https://WWW.eternalcitytoursを待っているという点で、人々がhttps://eternalcitytours.com /の下の自分のサイトに来ようとしたときにも、私は同じ問題を抱えていません。コム? –
それは大丈夫です - 私はSSLハンドシェイクの前に起こるDNSレコードレベルでそれを持っています。私が持っていた追加の問題は、私がCloudFlareを使ってすべてを変更していて、今は無効にしていたということでした。どうも –