Skip to content

Commit 0f97485

Browse files
authored
Update gae-app.php (GoogleCloudPlatform#665)
1 parent 1d27485 commit 0f97485

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

appengine/php72/wordpress/files/gae-app.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,23 @@ function get_real_file_to_load($full_request_uri)
44
{
55
$request_uri = @parse_url($full_request_uri)['path'];
66

7+
// Redirect /wp-admin to /wp-admin/ (adds a trailing slash)
78
if ($request_uri === '/wp-admin') {
89
header('Location: /wp-admin/');
910
exit;
1011
}
1112

13+
// Serve up "index.php" when /wp-admin/ is requested
1214
if ($request_uri === '/wp-admin/') {
1315
return '/wp-admin/index.php';
1416
}
1517

18+
// Load the file requested if it exists
1619
if (is_file(__DIR__ . $request_uri)) {
1720
return $request_uri;
1821
}
1922

23+
// Send everything else through index.php
2024
return '/index.php';
2125
}
2226

0 commit comments

Comments
 (0)