All pastes #69939 Raw Edit

Jink

public text v1 · immutable
#69939 ·published 2006-06-23 16:16 UTC
rendered paste body
# BEGIN WordPress
<IfModule mod_rewrite.c>
  # enable the engine
  RewriteEngine On

  # we're rewriting in /blog/
  RewriteBase /blog/

  # if it isn't a file...
  RewriteCond %{REQUEST_FILENAME} !-f
  # ...and no directory either
  RewriteCond %{REQUEST_FILENAME} !-d

  # rewrite /blog/Main/ to index.php?n_location=Main
  # RewriteRule ^([^/]+)/?$ /blog/index.php&n_location=$1 [L,QSA]
  # rewrite /blog/Main/2/ to index.php?n_location=Main&cat=2
  # RewriteRule ^([^/]+)/([^/]+)/?$ /blog/index.php&n_location=$1&cat=$2 [L,QSA]
  # rewrite /blog/1 to /blog/index.php&cat=1
  RewriteRule ^([0-9]+)/?$ /blog/index.php&cat=$1 [L,QSA]

  # rewrite the rest to /blog/index.php
  RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress