WordPress.org

Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#8062 closed defect (bug) (fixed)

.htaccess Issues

Reported by: covert215 Owned by: markjaquith
Milestone: 2.7 Priority: normal
Severity: major Version:
Component: Permalinks Keywords:
Focuses: Cc:

Description

I just updated to the newest version in the trunk (9515). The whole site is now returning a 500 error. I traced this to the .htaccess file, which now reads:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase Array
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . Arrayindex.php [L]
</IfModule>

# END WordPress

I cleared the file, but when I tried to reset my permalinks, it reverted to the broken version.

Somewhere along the line, an array is being returned where a single variable is expected.

Change History (5)

#1 @covert215
13 years ago

  • Milestone changed from 2.8 to 2.7
  • Severity changed from normal to major

#2 @covert215
13 years ago

Tracing the issue a bit further, $home_root in /wp-includes/rewrite.php is the unexpected array.

$home_root = parse_url(get_option('home'));
$home_root = trailingslashit($home_root['path']);

Could this be related to a setting on my site or is it a bug in the code?

#3 @covert215
13 years ago

I was looking at an older version of rewrite.php.

The code causing the issue is

$home_root = parse_url(get_option('home'));
if ( isset( $home_root['path'] ) ) {
   $home_root = trailingslashit($home_root['path']);
}

It looks like the if condition is false, causing the problem.

#4 @westi
13 years ago

  • Component changed from General to Permalinks
  • Owner changed from anonymous to markjaquith

Possibly fixed by [9516] ?

#5 @covert215
13 years ago

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

Fixed in [9516]

Note: See TracTickets for help on using tickets.