[Tinhte] Image Attachment Optimization & CDN Support

[Tinhte] Image Attachment Optimization 2.3.0 20170315

No permission to download
OK... I'm determined to make this work

( let's get past the vocabulary )

Website is sociallyuncensored.eu
Static files are sociallyuncensored.com
Using MaxCDN I have a pull zone for cdn.sociallyuncensored.com

Using this modification I have it setup for cdn.sociallyuncensored.com/

But attachments do not show up when using that CDN in this modification.

Thoughts?

Let's me see an image url that you have it on cdn?
For example: cdn.sociallyuncensored.com/style/abc.jpg
 
Let's me see an image url that you have it on cdn?
For example: cdn.sociallyuncensored.com/style/abc.jpg
http://cdn.sociallyuncensored.com/styles/meta_image.png

meta_image.png
 
Code:
1. original:
http://www.sociallyuncensored.eu/forums/attachments/www-sociallyuncensored-eu-2012-8-29-18-35-24-png.686/
2. your pull cdn should be:
http://cdn.sociallyuncensored.com/forums/attachments/www-sociallyuncensored-eu-2012-8-29-18-35-24-png.686/

But the second is not working now, it's being redirected to somewhere else. Your CDN setup isn't good.
 
Code:
1. original:
http://www.sociallyuncensored.eu/forums/attachments/www-sociallyuncensored-eu-2012-8-29-18-35-24-png.686/
2. your pull cdn should be:
http://cdn.sociallyuncensored.com/forums/attachments/www-sociallyuncensored-eu-2012-8-29-18-35-24-png.686/

But the second is not working now, it's being redirected to somewhere else. Your CDN setup isn't good.
Both of your links end in www-sociallyuncensored-eu

I can not locate that anywhere on my site. Where are you seeing this? I can not confirm your findings.

EDIT: never mind. Found it.

As I kept the default setting for MaxCDN .... I do not know why that isn't redirecting correctly.

Edit Again: Isn't that the whole point of this add-on so attachments will work with a CDN? Which is what I've been trying to communicate with you... That it's NOT working.

I feel we have a communication issue here.
 
Both of your links end in www-sociallyuncensored-eu

I can not locate that anywhere on my site. Where are you seeing this? I can not confirm your findings.

EDIT: never mind. Found it.

As I kept the default setting for MaxCDN .... I do not know why that isn't redirecting correctly.

OK. Try to fix this with your CDN setup then everything will be fine.
 
OK. Try to fix this with your CDN setup then everything will be fine.
My CDN is working fine. Isn't part of this modification's job to help get attachments to direct correctly to the CDN?

(New) Support CDN for attachment images. You can serve these images via CloudFront, MaxCDN or other CDN services.

It is only the attachments which are not working. And that is what I've been trying to explain from the start... That for some reason your modification isn't working correctly and if you would have any thoughts on this or not?!

I feel we're having a communication issue.
 
My CDN is working fine. Isn't part of this modification's job to help get attachments to direct correctly to the CDN?
It is only the attachments which are not working. And that is what I've been trying to explain from the start... That for some reason your modification isn't working correctly and if you would have any thoughts on this or not?!

I feel we're having a communication issue.

It's not working fine Adam, If it working fine, you will see a permission error (if my addon was not installed or disabled). This is not related to my addon.

So, firstly, you have to make it it not redirect to another url, keep it same structure as orginal structure


Code:
1. original:
http://www.sociallyuncensored.eu/forums/attachments/www-sociallyuncensored-eu-2012-8-29-18-35-24-png.686/
2. your pull cdn should be:
http://cdn.sociallyuncensored.com/forums/attachments/www-sociallyuncensored-eu-2012-8-29-18-35-24-png.686/


If your setup works:
- When my addon disable: you will see permission error (not logged in, so CDN can not pull)
- When my addon enable: you will see the image.
 
It's not working fine Adam, If it working fine, you will see a permission error (if my addon was not installed or disabled). This is not related to my addon.

So, firstly, you have to make it it not redirect to another url, keep it same structure as orginal structure


Code:
[I][FONT=Consolas]1. original:[/FONT][/I]
[FONT=Consolas][I][URL]http://www.sociallyuncensored.eu/forums/attachments/www-sociallyuncensored-eu-2012-8-29-18-35-24-png.686/[/URL][/I][/FONT]
[FONT=Consolas][I]2. your pull cdn should be: [/I][/FONT]
[I][FONT=Consolas][URL]http://cdn.sociallyuncensored.com/forums/attachments/www-sociallyuncensored-eu-2012-8-29-18-35-24-png.686/[/URL][/FONT][/I]


If your setup works:
- When my addon disable: you will see permission error (not logged in, so CDN can not pull)
- When my addon enable: you will see the image.
I think you've made my point, but we're both seeing this from a different view.

My CDN is working
I believe your modification is not (at least for me).

I do not know why and was wondering if you had any idea.
I've come to believe you don't and neither do I.

Thank you for your time and willingness to answer my question :)
 
I think you've made my point, but we're both seeing this from a different view.

My CDN is working
I believe your modification is not (at least for me).

I do not know why and was wondering if you had any idea.
I've come to believe you don't and neither do I.

Thank you for your time and willingness to answer my question :)


For simple,

When I type: http://cdn.sociallyuncensored.com/forums /attachments/www-sociallyuncensored-eu-2012-8-29-18-35-24-png.686/
it become:

http://www.sociallyuncensored.eu/forums/ s /attachments/www-sociallyuncensored-eu-2012-8-29-18-35-24-png.686/#axzz25M1sd1R8

Why do you (or MaxCDN) add s to your url?
If there is no s, your images will be displayed fine.
 
For simple,

When I type: http://cdn.sociallyuncensored.com/f...allyuncensored-eu-2012-8-29-18-35-24-png.686/
it become:

http://www.sociallyuncensored.eu/forums/ s /attachments/www-sociallyuncensored-eu-2012-8-29-18-35-24-png.686/#axzz25M1sd1R8

Why?
If there is no s, your images will be displayed fine.

I have no idea. Zip. Zero. None. Not clue.

The only thing that would re-direct anything would be htaccess, but everything looks fine for me.

PHP:
AddHandler application/x-httpd-php54 php
 
Options FollowSymLinks MultiViews -Indexes
 
<IfModule mod_php5.c>
php_value max_execution_time 120
php_value max_input_time 300
php_value memory_limit 256M
</IfModule>
 
ServerSignature Off
ServerTokens Prod
 
<Files .htaccess>
order allow,deny
deny from all
</Files>
 
<Files "admin.php">
Order Deny,Allow
Deny from all
Allow from 71.xx.x.x
Allow from 86.x.x.xx
</Files>
 
 
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
# Despite the name similarity, the following Add* directives have nothing
# to do with the FancyIndexing customization directives above.
#
AddEncoding x-compress .Z
AddEncoding x-gzip .gz .tgz
 
 
#    Mod_security can interfere with uploading of content such as attachments. If you
#    cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
#    SecFilterEngine Off
#    SecFilterScanPOST Off
#</IfModule>
 
ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default
 
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.sociallyuncensored.eu [NC]
RewriteCond %{HTTP_HOST} !^([^.]+).sociallyuncensored.eu [NC]
RewriteRule (.*) http://www.sociallyuncensored.eu/$1 [R=301,L]
 
    #    If you are having problems with the rewrite rules, remove the "#" from the
    #    line that begins "RewriteBase" below. You will also have to change the path
    #    of the rewrite to reflect the path to your XenForo installation.
    #RewriteBase /xenforo
 
    #    This line may be needed to enable WebDAV editing with PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
 
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
 
RewriteCond %{REQUEST_METHOD} ^(HEAD|TRACE|DELETE|TRACK) [NC,OR]
RewriteCond %{THE_REQUEST} (\\r|\\n|%0A|%0D) [NC,OR]
 
RewriteCond %{HTTP_REFERER} (<|>|’|%0A|%0D|%27|%3C|%3E|%00) [NC,OR]
RewriteCond %{HTTP_COOKIE} (<|>|’|%0A|%0D|%27|%3C|%3E|%00) [NC,OR]
RewriteCond %{REQUEST_URI} ^/(,|;|:|<|>|”>|”<|/|\\\.\.\\).{0,9999} [NC,OR]
 
RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (libwww-perl|curl|wget|python|nikto|scan) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (<|>|’|%0A|%0D|%27|%3C|%3E|%00) [NC,OR]
 
#Block mySQL injects
RewriteCond %{QUERY_STRING} (;|<|>|’|”|\)|%0A|%0D|%22|%27|%3C|%3E|%00).*(/\*|union|select|insert|cast|set|declare|drop|update|md5|benchmark) [NC,OR]
 
RewriteCond %{QUERY_STRING} \.\./\.\. [OR]
 
RewriteCond %{QUERY_STRING} (localhost|loopback|127\.0\.0\.1) [NC,OR]
RewriteCond %{QUERY_STRING} \.[a-z0-9] [NC,OR]
RewriteCond %{QUERY_STRING} (<|>|’|%0A|%0D|%27|%3C|%3E|%00) [NC]
# Note: The final RewriteCond must NOT use the [OR] flag.
 
# Return 403 Forbidden error.
RewriteRule .* index.php [F]
</IfModule>
<FilesMatch "\.(gif|ico|jpg|jpeg|png|flv|swf|pdf|mp3|mp4|xml|txt|js|css)$">
Header set Cache-Control "max-age=691200"
</FilesMatch>
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css
    AddOutputFilterByType DEFLATE application/javascript application/x-javascript
    AddOutputFilterByType DEFLATE application/xml application/xhtml+xml application/rss+xml
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 60 seconds"
ExpiresByType text/html "access plus 60 seconds"
ExpiresByType image/gif "access plus 3456000 seconds"
ExpiresByType image/jpeg "access plus 3456000 seconds"
ExpiresByType image/png "access plus 3456000 seconds"
ExpiresByType text/css "access plus 3456000 secondss"
ExpiresByType text/javascript "access plus 3456000 seconds"
ExpiresByType application/x-javascript "access plus 3456000 seconds"
ExpiresByType text/xml "access plus 60 seconds"
ExpiresByType image/x-icon "access plus 1 days"
ExpiresByType image/ico "access plus 1 days"
</IfModule>
 
Is this image attachment optimization addon working for you with Max CDN? If so, I'll try your guide. Cloudflare sucks BALLS.
NO.

That is the whole argument I've been trying to make. THIS modification DOES NOT work with MaxCDN .... Correction it does work, but not the CDN part of it.

I have a test site (with nothing else installed) and it too did not work with this modification. I do not know what the developer uses for a CDN, but as far as I can tell... This add-on does not work with MAXCDN

I have had my web host and MaxCDN review my setup. They agree that all is working as it should.

(me/ Is mildly upset that he's had to defend his own setup. Steps out of thread)
 
Try to replace your custom cdn with the default url that maxcdn give you for your pullzone.
Use this default url in your config file, style setup, etc and restart your server.

I got it working on my maxcdn before with and without custom cdn url. I now use Cloudfront and no longer us maxcdn so I can't test.
 
NO.

That is the whole argument I've been trying to make. THIS modification DOES NOT work with MaxCDN .... Correction it does work, but not the CDN part of it.

I have a test site (with nothing else installed) and it too did not work with this modification. I do not know what the developer uses for a CDN, but as far as I can tell... This add-on does not work with MAXCDN

I have had my web host and MaxCDN review my setup. They agree that all is working as it should.

(me/ Is mildly upset that he's had to defend his own setup. Steps out of thread)
Doesn't work with my subdomain that's set up with cloudflare either. I signed up for MaxCDN last night but it looks like I might not even bother if it's not working with MaxCDN.
 
Top Bottom