WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/31/2004 05:22:25 PM (14 years ago)
Author:
rboren
Message:

Revamp rewrite rule generation. Add clean page links. Credit to Jaykul for get_pagenum_link().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options-permalink.php

    r1350 r1373  
    126126$rules = '';
    127127foreach ($rewrite as $match => $query) {
    128     if (strstr($query, 'index.php')) $rules .= 'RewriteRule ^' . $match . ' ' . $home_root . $query . " [QSA]\n";
    129     $rules .= 'RewriteRule ^' . $match . ' ' . $site_root . $query . " [QSA]\n";
     128    if (strstr($query, 'index.php')) {
     129        $rules .= 'RewriteRule ^' . $match . ' ' . $home_root . $query . " [QSA]\n";
     130    } else {
     131        $rules .= 'RewriteRule ^' . $match . ' ' . $site_root . $query . " [QSA]\n";
     132    }
    130133}
    131134echo apply_filters('rewrite_rules', $rules);
    132135?>
    133     </textarea>
     136</textarea>
    134137    </p>
    135138    <?php printf(__('<p>If your <code>.htaccess</code> file is writable by WordPress, you can <a href="%s">edit it through your template interface</a>.</p>'), 'templates.php?file=.htaccess') ?>
Note: See TracChangeset for help on using the changeset viewer.