簡體   English   中英

將CodeIgniter網站移至新域但主機相同

[英]Moving CodeIgniter website over to a new domain but same host

我將Web應用程序移到同一主機上的新域,我已經編輯了.htaccess文件,現在看到重定向循環。 新域沒有HTTPS,但舊域具有SSL證書。 我不想為新域使用SSL。 這是.htaccess文件中的內容:

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.mywebsite.com/$1 [R=301,L]

#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|public|images|robots\.txt|css)
RewriteRule ^(.*)$ index.php/$1 [L]

應該能夠注釋掉https RewriteRule

嘗試改變

RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.mywebsite.com/$1 [R=301,L]

#RewriteCond %{SERVER_PORT} 80 
#RewriteRule ^(.*)$ https://www.mywebsite.com/$1 [R=301,L]

或保留備份並刪除這些行

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM