[wp-trac] Re: [WordPress Trac] #2984: 404 response header on js.php file

WordPress Trac wp-trac at lists.automattic.com
Mon Nov 27 23:09:39 GMT 2006


#2984: 404 response header on js.php file
---------------------+------------------------------------------------------
 Reporter:  ttscoff  |        Owner:  anonymous
     Type:  defect   |       Status:  new      
 Priority:  normal   |    Milestone:           
Component:  General  |      Version:  2.0.4    
 Severity:  normal   |   Resolution:           
 Keywords:  404 bug  |  
---------------------+------------------------------------------------------
Comment (by xurizaemon):

 Bump. This code shouldn't generate a 404 header in an external file that
 wants to access WP things, but rather only if WordPress can't find the
 content.

 My js.php file parses fine, but WP(2.0) returns a 404 header as a special
 bonus. So (as a crude workaround) I just rewrote the headers I didn't
 like, once wp-blog-header.php had done its filth.

 Alternatively, some other non-404ing method should be available to use
 WP's functions without it owning the headers. (Perhaps I missed that in
 the docs.)

 <?
   define('WP_USE_THEMES', false) ;
   require('../../../wp-blog-header.php');
   header("HTTP/1.1 200 OK");
   header("Status: 200 All rosy") ;
  ?>

 404 should only get set IF wordpress really is dealing with the request,
 IMO.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/2984#comment:3>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list