"Error establishing DB connection" when entering random path
-
When accessing a non-existing path like example.com/random, I get the “Error establishing a database connection” error instead of being forwarded to the themes’ 404 page. How can I fix that?
My client’s running WP 3.9.1 Multisite (subdirectory) with two sites and a “blank” main-site, installed under /wordpress.
“Blank”, redirects to /de:
example.com/wordpressGerman site:
example.com/wordpress/deEnglish site:
example.com/wordpress/enI’m redirecting all traffic from root to the main site, which redirects to the german site in .htaccess: (of course example.com is replaced by the real domain)
RewriteEngine On RewriteBase /wordpress/ RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L] RewriteEngine On RewriteCond %{HTTP_HOST} ^(www.)?example.com$ RewriteRule ^(/)?$ wordpress [L]My index.php says:
<?php /** * Front to the WordPress application. This file doesn't do anything, but loads * wp-blog-header.php which does and tells WordPress to load the theme. * * @package WordPress */ /** * Tells WordPress to load the WordPress theme and output it. * * @var bool */ define('WP_USE_THEMES', true); /** Loads the WordPress Environment and Template */ require( dirname( __FILE__ ) . '/wordpress/wp-blog-header.php' );Any suggestions are highly appreciated, thanks!
The topic ‘"Error establishing DB connection" when entering random path’ is closed to new replies.