RE: [PHP] Win 98 Apache - Directory style Query Strings on PHP Files without extensions

2002-10-15 Thread Jon Haworth

Hi Andy,

 Although http://www.mysite.com/ or http://www.mysite.com/index 
 work fine, picking up the index file okay  http://www.mysite.com/xxx/yyy/ 
 or http://www.mysite.com/index/xxx/yyy/ come back with internal 
 server errors.

Have a look into mod_rewrite, I think you'll be able to achieve what you
want through that. There's a great article on this at alistapart:
http://www.alistapart.com/stories/succeed

HTH
Jon



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Win 98 Apache - Directory style Query Strings on PHP Files without extensions

2002-10-15 Thread Ford, Mike [LSS]

 -Original Message-
 From: Andy White [mailto:[EMAIL PROTECTED]]
 Sent: 15 October 2002 16:08
 To: [EMAIL PROTECTED]
 
 I'm trying to allow my Apache webserver, on Win 98 to run PHP 
 files without
 extensions.
 
 Where the file is index without an extension and xxx and 
 yyy are the
 sections of the query string.
 
 Although http://www.mysite.com/ or 
 http://www.mysite.com/index work fine,
 picking up the index file okay  http://www.mysite.com/xxx/yyy/ or
 http://www.mysite.com/index/xxx/yyy/ come back with internal 
 server errors.
 
 I have set the DirectoryIndex to index and DefaultType to
 application/x-httpd-php in the httpd.conf but I am at a 
 loss after that! 

I've successfully done this sort of thing in a couple of ways.  For your
scenario, I'd probably try this as first choice:

Alias / /dir/to/scripts/index.php/

Directory /dir/to/scripts/
AddType application/x-httpd-php .php
/Directory

This should invisibly inject a reference to index.php/ for all requests to
your site --note that it does NOT use DefaultType.  (/dir/to/scripts can be
your DocumentRoot if that's where index.php is!)

There are several variations on this, using AliasMatch and, yes, DefaultType
in various combinations, but I'd recommend this as the simplest route to get
*all* references to your site to be passed through /index.php without
actually mentioning it in your URLs.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php