lk******@geocities.com wrote:
Hi. I'm messing around with some stuff in an .htaccess file. Among
other things, I'd like to send my html files to the PHP parser. I'd
also like to rewrite the urls using Apache mod_rewrite, so that the
query string disappears, but the variables are still recorded. For all
these tasks, I need to know the PHP path. When I run phpinfo, I see
this listed as the Path:
PATH /bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
The path in php is where the interpreter will look for system commands
when a full path is not provided. For instance:
<?php $contents = `ls -fl`; ?>
PHP will look in each of the PATH directories for the ls command:
/bin/ls
/usr/bin/ls
/sbin/ls
/usr/sbin/ls
/usr/local/bin/ls
/usr/local/sbin/ls
If none of the above are found, then you will get an error...
I'm not sure how to use that infomation. Do I use all of it? Some of
it?
None of it?
..htaccess:
-----------
# Send all .html files through the php interpreter
AddType application/x-httpd-php .html
# mod rewrite to rewrite article/2005-10-03.html
# to article/view.php?date=2005-10-03 without
# changing any links in the site
RewriteEngine On
RewriteRule ^article/([^.]+)\.html$ article/view.php?date=$1 [L]
-----------
If you're trying to do something other than that, please explain it better.
--
Justin Koivisto, ZCE -
ju****@koivi.com http://koivi.com