Forums / Upgrading to 1.5.x / After upgrade customers can't download .dmg files

After upgrade customers can't download .dmg files

Started by darnaez on 2 May 2013, 12:00 PM · Views: 2,265

Results 1 to 9 of 9
2 May 2013, 12:00 PM
#1
darnaez avatar

darnaez

Zen Follower

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

After upgrade customers can't download .dmg files

This time I added the exception into the .htaccess into the /download directory but it doesn't work.

but now allow just certain necessary files:

<FilesMatch ".*.(zip|ZIP|dmg|DMG|gzip|pdf|PDF|mp3|MP3|swf|SWF|wma|WMA)$">
Order Allow,Deny

What I need to modify now???

Thanks!

2 May 2013, 12:06 PM
#2
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: After upgrade customers can't download .dmg files

You will also need to update the .htaccess file in the pub folder, because that is where the downloads are temporarily stored for the download

2 May 2013, 12:15 PM
#3
darnaez avatar

darnaez

Zen Follower

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

Re: After upgrade customers can't download .dmg files

Can you tell me what I need to add in that file? Because I used the same lines but it make the website unavailable.

2 May 2013, 1:55 PM
#4
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: After upgrade customers can't download .dmg files

In the .htaccess file in the pub there should also be a line (mine is at line 31):

# but now allow just *certain* necessary files:
<FilesMatch ".*\.(zip|ZIP|gzip|dmg|DMG|pdf|PDF|mp3|MP3|swf|SWF|wma|WMA|wmv|WMV|wav|epub)$">
  Order Allow,Deny
  Allow from all
</FilesMatch>

Do you also use the htaccess files supplied with ZC 1.5.x or did you leave the old ones in place?

2 May 2013, 4:14 PM
#5
darnaez avatar

darnaez

Zen Follower

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

Re: After upgrade customers can't download .dmg files

That is the problem. I would like to use the original version when upgrade to 1.5 but in the hurry to resolve the problem (I had a client claiming to download the product)... so I modified the .htaccess . THis is the lines. Do you discover where is the mistake? I used your lines but the problem persist.

############################################
## uncomment these lines for CGI mode
## make sure to specify the correct cgi php binary file name
## it might be /cgi-bin/php-cgi
#    Action php5-cgi /cgi-bin/php5-cgi
#    AddHandler php5-cgi .php
############################################
## GoDaddy specific options
#   Options -MultiViews
## you might also need to add this line to php.ini
##     cgi.fix_pathinfo = 1
## if it still doesn't work, rename php.ini to php5.ini
############################################
## this line is specific for 1and1 hosting
#AddType x-mapp-php5 .php
#AddHandler x-mapp-php5 .php
############################################
## default index file
DirectoryIndex index.php
<IfModule mod_php5.c>
############################################
## adjust memory limit
#    php_value memory_limit 64M
############################################
## disable magic quotes for php request vars
############################################
## disable automatic session start
## before autoload was initialized
############################################
# but now allow just *certain* necessary files:
<FilesMatch ".*\.(zip|ZIP|gzip|dmg|DMG|pdf|PDF|mp3|MP3|swf|SWF|wma|WMA|wmv|WMV|wav|epub)$">
  Order Allow,Deny
  Allow from all
</FilesMatch>
############################################
## enable resulting html compression
#php_flag zlib.output_compression on
###########################################
# disable user agent verification to not break multiple image upload
###########################################
# turn off compatibility with PHP4 when dealing with objects
</IfModule>
<IfModule mod_security.c>
###########################################
# disable POST processing to not break multiple image upload
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
<IfModule mod_deflate.c>
############################################
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip
# Insert filter on all content
###SetOutputFilter DEFLATE
# Insert filter on selected content types only
#AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript
# Netscape 4.x has some problems...
#BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
#BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
#BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Don't compress images
#SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
#Header append Vary User-Agent env=!dont-vary
</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
############################################
## you can put here your magento root folder
## path relative to web root
#RewriteBase /
############################################
## 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]
2 May 2013, 4:42 PM
#7
darnaez avatar

darnaez

Zen Follower

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

Re: After upgrade customers can't download .dmg files

Genius. Sorry... I never saw the /pub directory. I thought that you was talking the /public that is the root. Thanks a lot. Now is working fine.

2 May 2013, 5:17 PM
#8
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: After upgrade customers can't download .dmg files

Great :D, that's the second person this week calling me a genius :laugh: Will someone please tell my wife :lol:

Thanks for the feed back

2 May 2013, 7:19 PM
#9
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: After upgrade customers can't download .dmg files

Design75:

Great :D, that's the second person this week calling me a genius :laugh: Will someone please tell my wife :lol:

Thanks for the feed back
I will if you tell my husband that that things will work out better if he just does it MY WAY..
:laugh:

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.