Ticket #4970 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Rewrite for Pages is broken if URL has port #

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

Description

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

09/13/07 16:46:11 changed by Otto42

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

09/13/07 18:27:24 changed by westi

  • 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'];
	}

09/13/07 18:48:24 changed by markjaquith

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

09/13/07 19:24:06 changed by markjaquith

  • status changed from new to closed.
  • resolution set to fixed.

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