.htaccess direct request to file with $_get included
Posted: Tue Mar 07, 2006 2:29 pm
I need to use htaccess in a cetain folder on my website.
Lets call that folder: ratings
I need all image type requests from that folder to
redirect to the file called: modify.php
modify.php will reside in the ratings folder.
modify.php will use the $_GET to determine what to do
with each image being directed to it.
How would I write a .htaccess file to direct all image
request to the modify.php as well as add the $_GET param,
i.e. modify.php?img=myimage.jpg
So that any image request will auto forward to the modify.php
and be written with the ?img= so that the modify.php knows what to do?
p.s.
I have tried to use
but on my current server that is not working.
I assume there are other ways to handle redirects and
need some help with other possible ways
Lets call that folder: ratings
I need all image type requests from that folder to
redirect to the file called: modify.php
modify.php will reside in the ratings folder.
modify.php will use the $_GET to determine what to do
with each image being directed to it.
How would I write a .htaccess file to direct all image
request to the modify.php as well as add the $_GET param,
i.e. modify.php?img=myimage.jpg
So that any image request will auto forward to the modify.php
and be written with the ?img= so that the modify.php knows what to do?
p.s.
I have tried to use
Code: Select all
addhandler wtmrk .jpg, gif, png
action wtmrk /ratings/modify.phpI assume there are other ways to handle redirects and
need some help with other possible ways