Skip to content

Instantly share code, notes, and snippets.

@bjhess
Created February 1, 2010 04:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjhess/291457 to your computer and use it in GitHub Desktop.
Save bjhess/291457 to your computer and use it in GitHub Desktop.
# Specific rewrite rules for blog traffic
<Directory /server/directory/to/app/current/public/blog>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</Directory>
RewriteRule ^/blog$ /blog/index.php [QSA]
RewriteRule ^(/blog.*/$)$ $1/index.php [QSA]
RewriteRule ^/blog/?(.*)$ %{DOCUMENT_ROOT}/blog/$1 [NC,QSA,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment