MattWilcox / Adaptive-Images

Automatically adapts your existing HTML images for mobile devices. No mark-up changes needed.
http://adaptive-images.com/
1.76k stars 229 forks source link

403 error edit: page only loads on https #198

Open MrBryan opened 8 years ago

MrBryan commented 8 years ago

I installed adaptive images on relatively bare .htaccess and it makes the root of the domain 403

I enabled error reporting but I get nothing... GD is installed, php is version PHP 5.2.17-pl5-gentoo

here's what was already in the .htaccess

removehandler server-parsed .html .htm addtype application/x-httpd-php .html .htm

Any ideas?

MrBryan commented 8 years ago

Turns out I can still load pages on https. Without adaptive images loaded http and https work, with it on, http loaded pages 403 especially when listing directories website.com/page/ vs website.com/page/index.php

schlaubstar commented 7 years ago

I also got a strange problem when I try to force SSL/HTTPs.

When I do not enforce but use https, everything works fine and in those cases I get the response "304 Not changed" from AI, when requesting an image. When I add the following lines to the .htaccess file

RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

I suddenly get endless "chains" of 301 Permanently moved responses that cause the images to not be displayed. Does anyone have an Idea what is wrong ? If I do not enforce https via .htaccess the requests to AI are made via https and everything works fine.