Skip to content

Instantly share code, notes, and snippets.

@askedrelic
Created March 14, 2011 21:33
Show Gist options
  • Save askedrelic/869932 to your computer and use it in GitHub Desktop.
Save askedrelic/869932 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name www.thebehrensventure.com;
rewrite ^/(.*) http://thebehrensventure.com/$1 permanent;
}
server {
listen 80;
server_name thebehrensventure.com;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?q=$1 last;
break;
}
# if the requested file exists, return it immediately
if (-f $request_filename) {
break;
}
# all other requests go to Wordpress
if (!-e $request_filename) {
rewrite . /index.php last;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment