.htaccess 强制使用HTTPS破坏了我的页面设计

.htaccess 强制使用HTTPS破坏了我的页面设计,.htaccess,https,config,.htaccess,Https,Config,https正在破坏我的网站设计。请看一看 如果有帮助的话,我正在使用opencart 我在管理员/系统中启用了SSL 配置文件: // HTTP define('HTTP_SERVER', 'http://www.pawpost.com.au/'); define('HTTP_IMAGE', 'http://www.pawpost.com.au/image/'); define('HTTP_ADMIN', 'http://www.pawpost.com.au/admin/'); // HTTP

https正在破坏我的网站设计。请看一看

如果有帮助的话,我正在使用opencart

我在管理员/系统中启用了SSL

配置文件:

// HTTP
define('HTTP_SERVER', 'http://www.pawpost.com.au/');
define('HTTP_IMAGE', 'http://www.pawpost.com.au/image/');
define('HTTP_ADMIN', 'http://www.pawpost.com.au/admin/');

// HTTPS
define('HTTPS_SERVER', 'http://www.pawpost.com.au/');
define('HTTPS_IMAGE', 'http://www.pawpost.com.au/image/');
define('HTTP_ADMIN', 'http://www.pawpost.com.au/admin/');
.htaccess:

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

RewriteCond %{HTTPS} off
RewriteRule (.*) https://www.pawpost.com.au/ [R]
有什么想法吗??这快把我逼疯了

已尝试:

  • 仅在管理中使用SSL“开启”
  • SSL“开启”和配置文件的方式如上所述
  • SSL“on”和.htaccess的访问方式与上面的相同
  • 使用SSL'on'、.htaccess和配置文件

  • 看起来您的图像引用了http://路径。您需要将图像和CSS文件的任何路径更新为相对路径或绝对路径,以将https://包含在其中。

    尝试更新您定义为使用https的https链接:

    // HTTPS
    define('HTTPS_SERVER', 'https://www.pawpost.com.au/');
    define('HTTPS_IMAGE', 'https://www.pawpost.com.au/image/');
    define('HTTP_ADMIN', 'https://www.pawpost.com.au/admin/');
    

    我可以在配置文件或.htaccess中执行此操作吗?或者我必须检查每一个文件来手动更改它?我会亲自更改它。如果您有shell访问权限,您可以编写脚本打开每个文件,并在找到它的地方将http://替换为https://这样可能会奏效。(我还没有测试)[代码]查找-名称“*.html”-print | xargs sed-i-e's/谢谢!这些小事很容易被忽视(至少被我们这些傻瓜忽略),这真是太好了。