RE: [PHP] PHP and Xbithack ?
| From: | Lawrence dot Sheed at dfait-maeci dot gc dot ca | Date: | Tue, 03 Oct 2000 14:29:01 +0000 |
| Subject: | RE: [PHP] PHP and Xbithack ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-18422@lists.php.net to get a copy of this message | ||
You don't need to set the xbithack style.
You can set a cgi to run if no index file is found in the .htaccess file.
That cgi can then grab its path from PATH_INFO and run accordingly.
I do that exact thing in my pictures section on the shanghaiguide -
shanghaiguide.com/pics
There is a .htaccess file pointing to a php file in the pictures directory
(readdir.php3), it checks the path_info and outputs html based on the
current directory (in my case with pictures).
I can give you more info tomorrow if you need (not at *my* computer at the
moment)
-----Original Message-----
From: pgregg-php@niweb.com [mailto:pgregg-php@niweb.com]
Sent: October 3, 2000 6:24 PM
To: php-general@lists.php.net
Subject: [PHP] PHP and Xbithack ?
Purely for cosmetic reasons, but...
Has anyone provided a way for PHP to be executed based upon the executable
bits of the filename. Exactly like apache/mod_include's XBitHack directive.
I don't want to put the files in a cgi directory or write the programs
as a php cgi - I'd like to create a file called e.g.
directory (no extension) set executable on it and then be able to
call: http://www.mydom.com/directory/Category/SubCategory/etc/etc
which would parse directory as PHP and then have
PATH_INFO = "/directory/Category/SubCategory/etc/etc"
If I call the file directory.php then the above happens... I'd be nice for
some purposes to be able to drop the ".php" extension and an "XBitHack"
seems
to be a good way to do it.
Paul.
--
| Paul Gregg |T: +44 (0) 28 90 424190 |
| Technical Director |F: +44 (0) 28 90 424709 | Club24 Internet
| The Internet Business Ltd |W: http://www.tibus.net/|
| Holywood House, Innis Court |E: info @ tibus . net | c24.co.uk
| Holywood, Co Down, BT18 9HF |P: pgregg @ tibus . net |
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net