【问题标题】:moving from localhost to production codeigniter project从本地主机迁移到生产代码点火器项目
【发布时间】:2016-09-29 04:51:11
【问题描述】:

我在服务器上上传了我的 codeigniter 网站。在网站中的服务器上上传网站后,一些图像正在显示,一些图像没有正确显示..还有一些文字显示在边界之外..

我使用filezila将文件从本地上传到服务器。

这里是 .htaccess

RewriteEngine On
 RewriteBase /beta/lalcoresidency 

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond $1 !^(index\.php|images|robots\.txt|css|docs|js|system)
  RewriteRule ^(.*)$ /beta/lalcoresidency/index.php?/$1 [L] 

我的 config.php

 $config['base_url'] = 'https://www.lalcoresidency.com/beta/lalcoresidency/';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
$config['url_suffix'] = '';
$config['language'] = 'english';
$config['charset'] = 'UTF-8';
$config['enable_hooks'] = FALSE;
$config['subclass_prefix'] = 'MY_';

这是我的网站链接

https://www.lalcoresidency.com/beta/lalcoresidency/home

请帮助我找出解决方案。我尝试了很多但没有得到解决方案..请帮助

【问题讨论】:

  • 不太确定哪些图像没有重新加载,但例如您的 google 字体被拒绝,因为您的服务器在 HTTPS 上运行并且您通过 HTTP 请求 google 字体。要解决这个问题,您还必须通过 HTTPS 包含谷歌字体。这会导致 JS 错误,这也可能导致您的其他问题。
  • 我如何解决这个 xatenev...请帮助
  • 通过 HTTPS 包含谷歌字体。
  • 有任何链接或者我在代码中将http更改为https
  • 字体问题解决了图片和所有布局怎么样..

标签: php codeigniter server


【解决方案1】:

您的服务器在 HTTPS 上运行,并且您通过 HTTP 请求 google 字体..将所有 http 更改为 https。

示例:

<link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>

<link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>

【讨论】:

    猜你喜欢
    • 2013-08-20
    • 1970-01-01
    • 2015-06-18
    • 1970-01-01
    • 2018-07-04
    • 2011-10-22
    • 2017-12-20
    • 2015-01-19
    • 2020-05-30
    相关资源
    最近更新 更多