Log in with username/password: lyceum/lyceum

Ticket #548: classes.php.diff

File classes.php.diff, 1.3 kB (added by jjb, 2 years ago)

I'm pretty sure that with these changes, the directory URL cases work perfectly (only the subdomain case doesn't work).

  • src/lib/wp-includes/classes.php

    old new  
    14041404      // $site_root = parse_url(get_settings('siteurl')); 
    14051405      // $site_root = trailingslashit($site_root['path']); 
    14061406 
    1407       $site_root = WEBROOT; 
     1407      $site_root = '' == WEBROOT ? '/' : WEBROOT; 
    14081408      // $home_root = parse_url(get_settings('home')); 
    14091409      // $home_root = trailingslashit($home_root['path']); 
    14101410     
    14111411      $rules = "\n\tRewriteEngine On\n"; 
    1412       if ('' != $site_root) 
    1413          $rules .= "\tRewriteBase $site_root"; // I'm pretty sure we need this for cases where lyceum is installed in subdirectories, i.e. http://example.com/apps/lyceum/ 
     1412      $rules .= "\tRewriteBase $site_root"; 
    14141413 
    14151414      if(SUBDOMAINS) 
    14161415         $rules .= " 
     
    14241423 
    14251424#  RewriteRule ^([^/]+)/wp-comments-post(.*).php wp-comments-post$2.php [L,QSA] 
    14261425 
     1426   RewriteRule ^admin$ /admin/ [R=301,NC,L] 
     1427 
    14271428   RewriteCond %{REQUEST_FILENAME} !-f 
    14281429   RewriteCond %{REQUEST_FILENAME} !-d 
    14291430 
     
    14491450 
    14501451#  RewriteRule ^([^/]+)/wp-comments-post(.*).php wp-comments-post$2.php [L,QSA] 
    14511452 
     1453   RewriteRule ^([^/]+)/admin$ $1/admin/ [R=301,NC,L] 
     1454 
    14521455   RewriteCond %{REQUEST_FILENAME} !-f 
    14531456   RewriteCond %{REQUEST_FILENAME} !-d 
    14541457   RewriteRule ^([^/]+)/admin/?$ wp-admin/index.php?b=$1& [L] 
Log in with username/password: lyceum/lyceum