Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#10719 closed defect (bug) (duplicate)

Wordpress MU redirection on path-based install

Reported by: antialias's profile antialias Owned by: markjaquith's profile markjaquith
Milestone: Priority: normal
Severity: normal Version: 2.8.4
Component: Canonical Keywords: needs-testing
Focuses: Cc:

Description

example:

I have a fresh WPMU instance set up to work with paths. Base install location is set to

http://example.com/

I have a blog set up on http://example.com/site/ and a post that is accessible at

http://example.com/site/blog/2009/09/01/hello-world/

If I add a www. into this path, like this:

http://www.example.com/site/blog/2009/09/01/hello-world/

WPMU will redirect to

http://example.com/site/

Expected behavior is to redirect to

http://example.com/site/blog/2009/09/01/hello-world/

The fix is a one-liner: line 167 in wpmu-settings:

header( "Location: http://" . $current_site->domain . $current_site->path );

change to:

header( "Location: http://" . $current_site->domain . $_SERVER['REQUEST_URI'] );

The patch is attached.

Attachments (1)

my-patch.diff (690 bytes) - added by antialias 15 years ago.

Download all attachments as: .zip

Change History (3)

@antialias
15 years ago

#1 @antialias
15 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

moved over to the TRAC instance for MU:
http://trac.mu.wordpress.org/attachment/ticket/1105/

#2 @Denis-de-Bernardy
14 years ago

  • Milestone Unassigned deleted
Note: See TracTickets for help on using tickets.