Simple Machines Community Forum

SMF Support => Server Performance and Configuration => Topic started by: woolly bugger on September 13, 2017, 05:00:20 PM

Title: https and Image Proxy problem / question?
Post by: woolly bugger on September 13, 2017, 05:00:20 PM
i've implemented https on my forum directory mydomain/forum and enabled image proxy. it appears to be working on all images with the exception of the ones that I host on my site mydomain/myphotos/

if i edit the tags
from
Code: [Select]
[img]http://www.mydomain/myphotos/image.jpg[/img]
to
Code: [Select]
[img]https://www.mydomain/myphotos/image.jpg[/img]
the image will show up, but only if I make the change...

any ideas??? there are hundreds of post with thousands of images on the site with this issues!
Title: Re: https and Image Proxy problem / question?
Post by: shawnb61 on September 13, 2017, 05:26:44 PM
Sounds like you may need a redirect.

More info here:
https://www.simplemachines.org/community/index.php?topic=555034.0
Title: Re: https and Image Proxy problem / question?
Post by: woolly bugger on September 13, 2017, 05:33:19 PM
Sounds like you may need a redirect.

More info here:
https://www.simplemachines.org/community/index.php?topic=555034.0


here is the .htaccess i've placed in the forum directory

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} folder
RewriteRule ^(.*)$ https://www.mydomain.com/forum/$1 [R,L]
Title: Re: https and Image Proxy problem / question?
Post by: woolly bugger on September 13, 2017, 06:19:38 PM
when I click on the broken image icon

https://www.mydomain.com/forum/proxy.php?request=http%3A%2F%2Fwww.mydomain.com%2Fbtwc%2Fff2017%2F5-17%2F051317-2.jpg&hash=742f0c9b28fc21e43cab946c000dd8f


Here is how the image tags is in the post.

Code: [Select]
[img width=800 height=451]http://www.mydomain.com/btwc/ff2012/8/0825-12-2.jpg[/img]
Title: Re: https and Image Proxy problem / question?
Post by: br360 on September 13, 2017, 06:30:26 PM
The code in your .htacces looks correct but there is still an issue. When you click on your forum link that is in your signature, it should redirect me to https and it is not.

Can you try to run repair settings as well?
Title: Re: https and Image Proxy problem / question?
Post by: woolly bugger on September 13, 2017, 06:45:20 PM
The code in your .htacces looks correct but there is still an issue. When you click on your forum link that is in your signature, it should redirect me to https and it is not.

Can you try to run repair settings as well?

ran that, and ran it again to verify....
Title: Re: https and Image Proxy problem / question?
Post by: br360 on September 13, 2017, 06:54:39 PM
For your rewrite rule, find:

Code: [Select]
RewriteRule ^(.*)$ https://www.mydomain.com/forum/$1 [R,L]
replace with

Code: [Select]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
See if that works
Title: Re: https and Image Proxy problem / question?
Post by: shawnb61 on September 13, 2017, 06:56:48 PM
That redirect isn't working at all.   I ran the redirect checker on  http://www.brfff.com/forum/ it returned http 200 - no redirect.   

Is it in the right location?
Title: Re: https and Image Proxy problem / question?
Post by: shawnb61 on September 13, 2017, 08:09:14 PM
I suspect you need it in your root folder, not the /forum subfolder.

If you have multiple forums, each in their own subfolders, that will take a different approach.
Title: Re: https and Image Proxy problem / question?
Post by: Illori on September 14, 2017, 05:03:55 AM
Code: [Select]
[img width=800 height=451]http://www.mydomain.com/btwc/ff2012/8/0825-12-2.jpg[/img]

i think this is one of the known bugs with the proxy and has to be fixed.
Title: Re: https and Image Proxy problem / question?
Post by: woolly bugger on September 15, 2017, 11:17:01 AM
That redirect isn't working at all.   I ran the redirect checker on  http://www.brfff.com/forum/ it returned http 200 - no redirect.   

Is it in the right location?

ok, got the rewrite to work properly -- thanks...