forget about the links above, it's not demonstrating what i want
Main Topics
Browse All Topicshello,
i was using htaccess file to redirect my exe file extchang.exe to a php file (a download counter which count the download number then lauch thee exe file):
Redirect /extchang.exe http://www.yehiaeg.com/ext
the problem is when extchang.exe is redirect to the php file, the php file launch extchang.exe again after counting the download number which brings us back again to the php file again and again...
So, who to resolve this?
Thanks
Yehia
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Couple questions - is your website on a Linux or Windows server?
If it's on Linux, then you cannot use that program since Linux does not execute .exe files.
Also, if it's on Windows, you will not get the results you want since most browsers will prompt users to download an .exe file before they can run it.
Generally, most users will not execute an .exe file since this is a major security loophole - the file may be a trojan.
You're better off using a script written in php or perl.
Good point from badjuju - if the .exe is for download, you might want to zip it first.
Here are a couple of good PHP/MySQL download counter scripts you should look at:
Sunk Media Download Counter (free) - http://cgi.sunkmedia.plus.
and
Mike's Download Counter (GPL) - http://www.mikeleigh.com/d
Good luck.
what does "Linux does not execute .exe files" with me, i think u misunderstood my problem:
i am using a download counter for test.exe
in the htaccess file i added Redirect /test.exe http://www.yehiaeg.com/dco
so that any old sites linking directly to my exe will have to pass first to the counter
the problem is here,when dcounter.php links the users browser to my test.exe after adding +1 to a text file :
$cm = "Location: $file";
header ($cm);
this results a loop cause when the header function passes the browser to test.exe ,the htaccess file redirects again the browser to the counter and so on
After looking at your server spec, I can see it is hosted on a Unix/Linux server. This means that .exe files will not work. You can look for a script-based counter online.
YEHIAEG.COM
SSL Cert: No valid SSL on this Host, Get Secure
Website Status: Active
Reverse IP: Web server hosts 7989 websites (reverse ip tool requires free login)
Server Type: Apache/1.3.31 (Unix) FrontPage/5.0.2.2634 (Spry.com also uses Apache)
IP Address: 64.202.166.210 (ARIN & RIPE IP search)
IP Location: - Arizona - Mesa - Go Daddy Software Inc
Record Type: Domain Name
Monitor: Monitor or Backorder
Wildcard search: 'yehiaeg' or 'hi' in all domains.
Other TLDs: .com .net .org .info .biz .us
X [5 available domains]
Name Server: WSC1.JOMAX.NET WSC2.JOMAX.NET
ICANN Registrar: GO DADDY SOFTWARE, INC.
Created: 10-jul-2004
Expires: 10-jul-2005
Status: ACTIVE
As i see it,
$cm = "Location: $file";
header ($cm);
Is creating the problem as it requests apache to deliver the file. You can override this by simply interchanging the two lines with
readfile($file);
Here we are using filesystem function to output the file. If your file size is too big and takes more time to download, put
set_time_limit(1000);
at the starting of the dcounter.php file and it must work.
Business Accounts
Answer for Membership
by: periwinklePosted on 2004-08-15 at 16:27:31ID: 11806100
Clicking on the link above brought me to a download page?