Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a .htaccess file which contains:

<FilesMatch "^api$">
   ForceType application/x-httpd-php
   SetHandler application/x-httpd-php

This works on my local server but not on my actual host. When I try to access it just returns 404 Not Found, the output on my local server is $_SERVER['PATH_INFO'] and looks like it should. How do I resolve this issue at my host?

share|improve this question

First, I'm not sure why you'd need a FilesMatch, a simple :

<Files 'api'>
  ForceType application/x-httpd-php

should do.

Then, you may need to check that your actual host has an AllowOverride set to at least FileInfo so that your .htaccess has the possibility to do the ForceType.

share|improve this answer
According to my host, AllowOveride All is set – woody993 Feb 15 '10 at 0:03
And have you tried doing just a <Files> ? – mat Feb 15 '10 at 8:25
Yep, still receiving Not Found – woody993 Feb 15 '10 at 8:53
Well, there are a few possibilities left, either there's no AllowOverride All set, your host's not running apache, there's a something mispelled in your .htaccess file... You should have a look at the error log see if there is something there. – mat Feb 15 '10 at 8:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.