dsbowmvth16379079 2016-01-30 23:49
浏览 43
已采纳

将CodeIgniter网站移动到新域但是同一主机

I am moving over my web app to a new domain on the same host, I have edited the .htaccess file and now see a redirect loop. The new domain does not have HTTPS but the old domain had an SSL certificate. I want to use no SSL for the new domain. Here is what I have in the .htaccess file:

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]
  • 写回答

1条回答 默认 最新

  • dongxing2030 2016-01-31 00:15
    关注

    Should be able to comment out the https RewriteRule

    Try changing

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

    To

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

    Or keep a backup and delete those lines

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
  • ¥50 STM32单片机传感器读取错误
  • ¥15 (关键词-阻抗匹配,HFSS,RFID标签天线)
  • ¥15 机器人轨迹规划相关问题
  • ¥15 word样式右侧翻页键消失