Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#4970 closed defect (bug) (fixed)

Rewrite for Pages is broken if URL has port #

Reported by: driverkt Owned by: markjaquith
Milestone: 2.3 Priority: high
Severity: normal Version: 2.3
Component: General Keywords:
Focuses: Cc:


If I click on the link for any of my pages, in 2.3 beta 3 (beta2 had this problem too), it attempts to connect to my hostname without the port numbers afterward in order to load the page. This behavior is incorrect, and I think maybe the re-write rules are incorrect, because the link is correct - it's just redirecting wrong.

I'm going to revert my blog back to an older version of wordpress in the meantime.

Change History (4)

#1 @Otto42
11 years ago

You could give us an example link or information on how to reproduce the problem.

#2 @westi
11 years ago

  • Owner changed from anonymous to markjaquith
  • Priority changed from normal to high

I suspect the canocical redirect stuff is causing this.

Maybe it needs to check $_SERVER["SERVER_PORT"] != 80 (or 443) and include in the $requested_url:

	if ( !$requested_url ) {
		// build the URL in the address bar
		$requested_url  = ( isset($_SERVER['HTTPS'] ) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://';
		$requested_url .= $_SERVER['HTTP_HOST'];
		$requested_url .= $_SERVER['REQUEST_URI'];

#3 @markjaquith
11 years ago

Yep... that's the issue. I'll work on it.

#4 @markjaquith
11 years ago

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

(In [6112]) Handle ports for canonical redirects. Props driverkt and westi. fixes #4970

Note: See TracTickets for help on using tickets.