Wordpress - 404 problem on physical directories


/ Published in: PHP
Save to your folder(s)

Wordpress - 404 problem on physical directories. From the Support Forum.


Copy this code and paste it in your HTML
  1. add_filter( 'status_header', 'mf_hack_404', 10 );
  2. function mf_hack_404( $c ) {
  3. if( defined( 'GALLERY_NAME' ) ) {
  4. $header = '200';
  5. $text = get_status_header_desc( $header );
  6. $protocol = $_SERVER["SERVER_PROTOCOL"];
  7. if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol )
  8. $protocol = 'HTTP/1.0';
  9.  
  10. return "$protocol $header $text";
  11. }
  12. else
  13. return $c;
  14. }

URL: http://wordpress.org/support/topic/404-on-custom-non-wordpress-pages

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.