• I had an interesting problem…

    When using the plugin in the codex to get pages to be the front I realized there where no way to get the blog frontpage to display.

    It all lay in the rewrite rules of course, and I hacked it hardcore.
    To make it work I also had to add support for paging the blog, or the result would just be a 404 when trying to use the “previous posts” link. Here’s the code, it can be found in wp-includes/classes.php on line 1204 and ff (wp ver. 1.5):

    $rules .= "RewriteCond %{REQUEST_FILENAME} -f [OR]\n" .
    "RewriteCond %{REQUEST_FILENAME} -d\n" .
    "RewriteRule ^.*$ - [S=$num_rules]\n" .
    "RewriteRule ^blog/?$ /index.php?blog [QSA,L]\n". // added by me
    "RewriteRule ^blog/page/([0-9]+)/?$ /index.php?blog&paged=$1 [QSA,L]\n"; //added by me

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘rewrite rules to make blog accessible when using “page to front”’ is closed to new replies.