[thelist] PHP, mod_rewrite help (Dreamhost)
Timothy J. Luoma
luomat at peak.org
Fri Apr 30 10:13:34 CDT 2004
Short version:
I have a lot of URLS like this:
/ethan/daily/20040421
where "daily" is a PHP script but DefaultType is set to PHP. I am using
this (which I think I found on Evolt somewhere)
$pathInfo = ltrim($_SERVER['PATH_INFO'], '/');
$args = explode('/', $pathInfo);
Now I am moving to a new host (Dreamhost) and everything stopped working.
I need Exec (used to read EXIF comments out of JPG files) so I had to
compile my own PHP. PHP is now running as a CGI not Apache module, which
I am not thrilled about, but can't do much about.
Long story short: I can get it to work if I use this:
/ethan/daily?20040301
but if I use this
/ethan/daily/20040301
I get a generic "No input file specified" which I believe is Dreamhost's
way of issuing a 404 for PHP files under CGI (see [1] below).
I have spent days trying to get this to work. I've spent hours in Google
trying to figure out some mod_rewrite magic. I'm stuck, I'm at a
completely loss and hope that someone will give me some suggestion as to
where to go from here. I'm not averse to doing the work myself, but
everything I've tried has failed and I think I just need another set of
eyes.
Shouldn't this be a simple mod_rewrite? Since 'daily' is a PHP script,
can it be done within 'daily'? All I need to do is change the ? to /
Thanks for listening. Back to banging my head against the wall.
[1] What's the difference between PHP-CGI and PHP as an Apache module?
https://panel.dreamhost.com/kbase/index.cgi?area=2933
More information about the thelist
mailing list