Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a .htaccess file which contains:

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

This works on my local server but not on my actual host. When I try to access http://www.domain.com/api/path/info 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
add comment

1 Answer

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

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

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

Your Answer

 
discard

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