> -----Original Message-----
> From: Andy White [mailto:[EMAIL PROTECTED]]
> Sent: 15 October 2002 16:08
> 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

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.



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
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

Reply via email to