prg:php - can it be done ??

Using mod_rewrite to handle various content issues

prg:php - can it be done ??

Postby Nimmit » Thu Mar 24, 2005 4:36 am

Hello,
Im having some dificulty finding out weather or not it is actualy possible to use php as a rewritemap prg: script - as this forum is the mod_rewrite forum, i guess you guys are prob the best people to ask :D

I have spent ages looking and can seem to find a definitive answer?

This bloke seems to think you can in one of his examples
http://www.davidcoulson.net/writing/lxf/39/apache.pdf

But i cant find any other information on the matter?

Has anyone had any experence with this?

Thanks in advance

Sam
Nimmit
 
Posts: 2
Joined: Thu Mar 24, 2005 4:29 am

Postby Caterham » Thu Mar 24, 2005 5:03 am

or not it is actualy possible to use php as a rewritemap prg: script
It's only possible if you can use the she-bang line at the top of your PHP script like in Perl
#!/usr/bin/perl
The script will not be prased through the apache webserver.

The author of the PDF used
#!/usr/local/bin/php -q
You can call PHP scripts on the command (win)/shell (unix), so it looks like that this is possible. The "-q" is the quiet-mode.

RewriteMaps will not work with Windows.
I have spent ages looking and can seem to find a definitive answer?

Has anyone had any experence with this?
Just try it out... :confused:
Caterham
 
Posts: 690
Joined: Fri Dec 10, 2004 1:30 pm

Postby Nimmit » Thu Mar 24, 2005 6:22 am

Thank you very much for the info.

I have been trying it, but on windows. It has just been making apache hang i will have to try it on the server instead of my local machine.

Thanks again

Sam
Nimmit
 
Posts: 2
Joined: Thu Mar 24, 2005 4:29 am


Return to Content

Who is online

Users browsing this forum: No registered users and 8 guests

cron