Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Commit ce87c13

Browse files
authored
Fix wp-config.php to work in the admin as well as the front end.
1 parent c5b92a3 commit ce87c13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

www/wp-config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33

4-
if ( getcwd()=='/var/www' && isset( $_SERVER[ 'HTTP_HOST' ] ) ) {
4+
if ( preg_match( '#^/var/www#', getcwd() ) && isset( $_SERVER[ 'HTTP_HOST' ] ) ) {
55
$hostname = $_SERVER[ 'HTTP_HOST' ];
66
} else if ( is_file( __DIR__ . '/../HOSTNAME' ) ) {
77
$hostname = file_get_contents( __DIR__ . '/../HOSTNAME' );

0 commit comments

Comments
 (0)