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 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?