Forum Moderators: phranque
[mydomain.com...]
I am trying to rewrite this with no success. Here is what I am using:
RewriteEngine on
RewriteBase /
RewriteRule ^/cgi-bin/countdown\.cgi\?MyFile1_0\.zip$ getfile.php?id=6 [L]
I have also tried this:
RewriteRule ^cgi-bin/countdown\.cgi\?MyFile1_0\.zip$ getfile.php?id=6 [L]
I keep getting the dreaded 404, can someone point me in the right direction? Thanks in advance.
In simplest form, and assuming I understand your goal correctly, this might work. The trick is that RewriteRule cannot "see" query strings, as they are *not* part of a formal URL, but rather specify data to be passed to the resource handler at a URL:
RewriteEngine on
RewriteCond %{QUERY_STRING} ^MyFile1_0\.zip$
RewriteRule ^cgi-bin/countdown\.cgi$ /getfile.php?id=6 [L]
Jim