Question about repurposing WordPress 404 handler

Here is the tested code, you can use it as a mu-plugin: <?php /** * Filters whether to short-circuit default header status handling. * * Returning a non-false value from the filter will short-circuit the handling * and return early. * * @param bool $preempt Whether to short-circuit default header status handling. Default false. * … Read more

Unwanted redirect in admin area

I solved it with the help of a colleagues of mine by adding the following lines into wp-config.php: $_SERVER[‘HTTP_HOST’] = $_SERVER[‘HTTP_X_FORWARDED_HOST’]; $_SERVER[‘REQUEST_URI’] = ‘/stuff/wordpress’ . $_SERVER[‘REQUEST_URI’]; $_SERVER[‘SCRIPT_NAME’] = ‘/stuff/wordpress’ . $_SERVER[‘SCRIPT_NAME’]; $_SERVER[‘PHP_SELF’] = ‘/stuff/wordpress’ . $_SERVER[‘PHP_SELF’]; $_SERVER[‘REMOTE_ADDR’] = $_SERVER[‘HTTP_X_FORWARDED_FOR’];

Serve apache 404 for missing assets rather then wp 404 template WP_Rewrites

This very helpful page is unfortunately kind of burried on the codex: Basically mod_rewrite_rules hook will do the trick. function faster_htaccess_rules( $rules ){ $faster_rules = <<<EOD \n # BEGIN faster Apache 404 rules RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule \.(jpg|jpeg|png|gif|ico|swf|bmp)$ – [R=404,L] #Use instead for network sites #RewriteRule \.(jpg|jpeg|png|gif|ico|swf|bmp)$ – [nocase,redirect=404,last] # END faster Apache … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)