#1
  1. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    Perth West Australia
    Posts
    757
    Rep Power
    15

    AcceptPathInfo Apache2


    Hi , my search friendly urls aint so friendly anymore with apache 2
    with default apache 1.2.* conf

    www.whatever.com/this.php/that/other/

    would look back to this.php and pass that & other into $PATH_INFO

    it appears that apache2 is different and requires the addition of AcceptPathInfo 'somewhere'

    I have tried it in the core directives & in <files.. etc but it does not appear to work - can anyone tell me where this directive is supposed to go (I want it to be default for everything below DocumentRoot)

    any input appreciated
    resistance is no longer futile :: 423
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Posts
    4
    Rep Power
    0
    Haven't tried Apache2 yet but can't you take the entire REQUEST_URI as /this.php/that/other/ minus /this.php, which should be what you are interested in getting from PATH_INFO anyway.

    >> default for everything below DocumentRoot

    In 1.3.X using <Directory> is preferrable but that doesn't match everything because some REQUEST_URI could be from Alias like cgi-bin with ScriptAlias which doesn't reside under your <Directory "/path/to/docroot">. Therefore, a <Location> or even <LocationMatch> inside the <VirtualHost> block may be able to catch all possible REQUEST_URIs under your docroot.
  4. #3
  5. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    Perth West Australia
    Posts
    757
    Rep Power
    15
    ... nope, I cant get at anything as apache 404's

    I `could` then use a CGI as the error page and parse that but that defeats the object of AcceptPathInfo which is supposed to provide the lookback that was default in previous versions.

    searching around I see I am not alone with problem and have not seen anyone suggesting they have it working under any conditions..

    also tried in .htaccess with all the possible values (on,off,default) to no avail
    resistance is no longer futile :: 423
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Posts
    4
    Rep Power
    0
    Is it for mod_rewrite and are you forcing any application type (when using internal redirect) like I always specified in my posts (even for Apache 1.3x because it's a good practice) like this one here with the [T=application/x-httpd-php,L] so it mod_rewrite knows your this.php is really a PHP file.
    If mod_rewrite doesn't force tye automatically it will treat that request as if it's a request to the files on your file system, thus returning 404.
    So basically you need to tell mod_rewrite your this.php is a PHP script with [T=application/x-httpd-php,L]. Right now it appears to be the case because mod_rewrite doesn't recognize your this.php is a PHP script, thus not setting PATH_INFO.
    Last edited by freebsd; April 17th, 2002 at 03:50 AM.
  8. #5
  9. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    Perth West Australia
    Posts
    757
    Rep Power
    15
    Hi again,
    no I am not forcing the application type, but only because I should not have to, AcceptPathInfo is supposed to provide the lookback feature that existed before.

    After checking around all the mailing lists and seeing similar probs on other platforms I have added this to the httpd buglist.

    So I will use mod_rewrite for now, just a shame to have to.
    resistance is no longer futile :: 423
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    2
    Rep Power
    0
    We have resolved like this:

    AllowOverride FileInfo Limit (or All)

    and in .htaccess file

    <FilesMatch "^product.php$">
    SetHandler application/x-httpd-php
    AcceptPathInfo On
    </FilesMatch>

IMN logo majestic logo threadwatch logo seochat tools logo