Zen Cart Logo
Forums / General Questions / External link to images get Error 404 page no found

External link to images get Error 404 page no found

Views: 2,198

Results 1 to 18 of 18
3 Jun 2013, 7:51 PM
#1
darnaez avatar

darnaez

Zen Follower

Join Date:
Jun 2009
Location:
Miami, Fl
Posts:
138
Plugin Contributions:
0

External link to images get Error 404 page no found

I'm doing the Google Merchant spreadsheet of my products but in the column "image link". I put the link to my image product but when I want to access through the link I receive the "PAGE NO FOUND" Custom 404 Error Page.

Any solution? THanks!!!

3 Jun 2013, 7:53 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: External link to images get Error 404 page no found

Are these links to images?
Are these links not on your ZenCart?

By design, ZenCart links to images that are in the /images folder

I believe this issue has been addressed - "with success" and you can search this forum to see

3 Jun 2013, 8:01 PM
#3
darnaez avatar

darnaez

Zen Follower

Join Date:
Jun 2009
Location:
Miami, Fl
Posts:
138
Plugin Contributions:
0

Re: External link to images get Error 404 page no found

kobra:

Are these links to images?
Are these links not on your ZenCart?

By design, ZenCart links to images that are in the /images folder

I believe this issue has been addressed - "with success" and you can search this forum to see

Yes, the images are the ones that zencart uses "../images/". I already did a research but I don't see any question like this.

This image is on the "images/wallpaper" folder but if I put the link here the result is 404 error... at least on Google spreadsheet.

Thanks!

3 Jun 2013, 8:05 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: External link to images get Error 404 page no found

Post one of the links that result in the 404

3 Jun 2013, 8:09 PM
#5
darnaez avatar

darnaez

Zen Follower

Join Date:
Jun 2009
Location:
Miami, Fl
Posts:
138
Plugin Contributions:
0

Re: External link to images get Error 404 page no found

HERE IS ONE ... in the spreadsheet when I click jump to 404 error and that is because Google say that images are broken.
However if you go to the product the image is there!

3 Jun 2013, 8:15 PM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: External link to images get Error 404 page no found

Try omitting the "www." in the address

3 Jun 2013, 8:17 PM
#7
darnaez avatar

darnaez

Zen Follower

Join Date:
Jun 2009
Location:
Miami, Fl
Posts:
138
Plugin Contributions:
0

Re: External link to images get Error 404 page no found

it seems that if I put the image into a subfolder it works... but in images/ it doesn't. THanks. (without .www is the same)

3 Jun 2013, 8:20 PM
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: External link to images get Error 404 page no found

You might need to clear your browser's cache???

See it without the www HERE

3 Jun 2013, 8:50 PM
#9
darnaez avatar

darnaez

Zen Follower

Join Date:
Jun 2009
Location:
Miami, Fl
Posts:
138
Plugin Contributions:
0

Re: External link to images get Error 404 page no found

I'm totally confused. I tried this image on safari, chrome and firefox... http://ohmyicons.com/images/wallpapers/wp_cyclop_1.jpg the result is the same Eror 404. But the file is there! Should I put a .htaccess into the root???

3 Jun 2013, 9:21 PM
#10
allthingsidleroy avatar

allthingsidleroy

New Zenner

Join Date:
May 2013
Posts:
38
Plugin Contributions:
0

Re: External link to images get Error 404 page no found

DArnaez:

HERE IS ONE ... in the spreadsheet when I click jump to 404 error and that is because Google say that images are broken.
However if you go to the product the image is there!

The first image's location: /images/vs_nitro_xp.jpg
And the second location: /images/visualstyles/vs_nitro_xp.jpg

Are you sure you aren't using some modifications to your Google spreadsheet? Perhaps you've changed the locations of the images, but forgot to make a new spreadsheet?

3 Jun 2013, 9:28 PM
#11
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: External link to images get Error 404 page no found

I'm going to "guess" you have a ".htaccess" file in the root of your website (or /images). Why? Because all 404 errors are going to Zen Cart's "file not found" page. Mistakes in a ".htaccess" can cause unintended side effects such as those your store is exhibiting. Please post the contents of any ".htaccess" file present in the root of your website (obscure any references to the Zen Cart "admin" folder if present).

I'm also going to "guess" you (or your hosting provider) have enabled some sort of "anti-leach" or "anti-embed" code for images. Not only do these not really work... But they can cause images to not show up in certain cases (such as a website visitor going through a proxy, visitors who have privacy options set to hide the referrer field, when directly accessing the image via URL, and problems with search engine crawls). Find and disable this behavior.

3 Jun 2013, 9:37 PM
#12
darnaez avatar

darnaez

Zen Follower

Join Date:
Jun 2009
Location:
Miami, Fl
Posts:
138
Plugin Contributions:
0

Re: External link to images get Error 404 page no found

No no, I decided to move the vs_nitro_xp.jpg to a new folder because I thought that the problem was in the /images. But now I see it happen the same problem in the /images/wallpapers. I have no isea where is the problem. Can you see this image http://ohmyicons.com/images/wallpapers/wp_cyclop_1.jpg

3 Jun 2013, 9:52 PM
#13
darnaez avatar

darnaez

Zen Follower

Join Date:
Jun 2009
Location:
Miami, Fl
Posts:
138
Plugin Contributions:
0

Re: External link to images get Error 404 page no found

lhungil:

I'm going to "guess" you have a ".htaccess" file in the root of your website (or /images). Why? Because all 404 errors are going to Zen Cart's "file not found" page. Mistakes in a ".htaccess" can cause unintended side effects such as those your store is exhibiting. Please post the contents of any ".htaccess" file present in the root of your website (obscure any references to the Zen Cart "admin" folder if present).

This is the .htaccess on /images

# @copyright Copyright 2003-2010 Zen Cart Development Team
# @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
# @version $Id: .htaccess 16111 2010-04-29 22:39:02Z drbyte $
#
# This is used with Apache WebServers
#
# The following blocks direct HTTP requests to all filetypes in this directory recursively, except certain approved exceptions
# It also prevents the ability of any scripts to run. No type of script, be it PHP, PERL or whatever, can normally be executed if ExecCGI is disabled.
# Will also prevent people from seeing what is in the dir. and any sub-directories
#
# For this to work, you must include either 'All' or at least: 'Limit' and 'Indexes' parameters to the AllowOverride configuration in your apache/conf/httpd.conf file.
# Additionally, if you want the added protection offered by the OPTIONS directive below, you'll need to add 'Options' to the AllowOverride list, if 'All' is not specified.
# Example:
#<Directory "/usr/local/apache/htdocs">
#  AllowOverride Limit Options Indexes
#</Directory>
###############################
# deny *everything*
<FilesMatch ".*">
Order Allow,Deny
Deny from all
</FilesMatch>
# but now allow just *certain* necessary files:
<FilesMatch ".*\.(jpe?g|JPE?G|gif|GIF|jpg|png|PNG|swf|SWF)$" >
Order Allow,Deny
Allow from all
</FilesMatch>
IndexIgnore */*
## NOTE: If you want even greater security to prevent hackers from running scripts in this folder, uncomment the following line (if your hosting company will allow you to use OPTIONS):
# OPTIONS -Indexes -ExecCGI
3 Jun 2013, 10:09 PM
#14
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: External link to images get Error 404 page no found

No longer seeing direct requests to a known good image (/images/wallpapers/cosmos.jpg) failing (it was only working previously if it was opened first from the product page - thus the suspicion of some "anti-leach" code).

DArnaez:

This is the .htaccess on /images ...
So no ".htaccess" on the web site root? Why are we seeing the Zen Cart 404 page for requests such as "http://ohmyicons.com/404"? This is not usually what will happen when Zen Cart is installed "out-of-box"...

I know other people have also noted this... but why do requests for images on the domain "ohmyicons.com" work and requests for the same images on "www.ohmyicons.com" fail? Strange considering a request for "stylesheet.css" to either domain works no problem... I'm still betting there are some hidden rules enabled on your web server we are not privy to. Have you contacted the hosting provider?

3 Jun 2013, 10:17 PM
#15
darnaez avatar

darnaez

Zen Follower

Join Date:
Jun 2009
Location:
Miami, Fl
Posts:
138
Plugin Contributions:
0

Re: External link to images get Error 404 page no found

Sorry sorry! Yes this is the .htaccess

###########################################
</IfModule>
<IfModule mod_security.c>
###########################################
# disable POST processing to not break multiple image upload
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
<IfModule mod_deflate.c>
</IfModule>
<IfModule mod_ssl.c>
############################################
## make HTTPS env vars available for CGI mode
SSLOptions StdEnvVars
</IfModule>
<IfModule mod_rewrite.c>
############################################
## enable rewrites
Options +FollowSymLinks
RewriteEngine on
############################################
## workaround for HTTP authorization
## in CGI environment
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
############################################
## always send 404 on missing files in these folders
RewriteCond %{REQUEST_URI} !^/(media|skin|js|downloads)/
############################################
## never rewrite for existing files, directories and links
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
############################################
## rewrite everything else to index.php
RewriteRule .* index.php [L]
</IfModule>
############################################
## Prevent character encoding issues from server overrides
## If you still have problems, use the second line instead
AddDefaultCharset Off
#AddDefaultCharset UTF-8
<IfModule mod_expires.c>
############################################
## Add default Expires header
## http://developer.yahoo.com/performance/rules.html#expires
ExpiresDefault "access plus 1 year"
</IfModule>
############################################
## By default allow all access
Order allow,deny
Allow from all
############################################
## If running in cluster environment, uncomment this
## http://developer.yahoo.com/performance/rules.html#etags
#FileETag none
RewriteCond %{HTTP_REFERER} !^http://ohmyicons.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://ohmyicons.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.ohmyicons.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.ohmyicons.com$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.ohmyicons.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://www.ohmyicons.com$      [NC]
RewriteCond %{HTTP_REFERER} !^https://ohmyicons.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^https://ohmyicons.com$      [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|swf)$ - [F,NC]
4 Jun 2013, 12:08 PM
#16
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: External link to images get Error 404 page no found

DArnaez:

Sorry sorry! Yes this is the .htaccess

...

RewriteCond %{HTTP_REFERER} !^http://ohmyicons.com/.$ [NC]
RewriteCond %{HTTP_REFERER} !^http://ohmyicons.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.ohmyicons.com/.
$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.ohmyicons.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.ohmyicons.com/.$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.ohmyicons.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://ohmyicons.com/.
$ [NC]
RewriteCond %{HTTP_REFERER} !^https://ohmyicons.com$ [NC]
RewriteRule .*.(jpg|jpeg|gif|png|bmp|swf)$ - [F,NC]


This block is *some sort of "anti-leach" or "anti-embed" code for images*. As per my previous post,** remove this!**
4 Jun 2013, 1:51 PM
#17
darnaez avatar

darnaez

Zen Follower

Join Date:
Jun 2009
Location:
Miami, Fl
Posts:
138
Plugin Contributions:
0

Re: External link to images get Error 404 page no found

GENIUS. Thanks a lot!

4 Jun 2013, 3:02 PM
#18
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: External link to images get Error 404 page no found

No problem. Thank You for taking the time to report back and confirm the issue was related to rules in your ".htaccess" file and not with Zen Cart.

Image Protection is a murky area...

:smile: