Created
April 19, 2011 22:59
-
-
Save vvoody/929925 to your computer and use it in GitHub Desktop.
rewrite my old wordpress blog urls to new
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# part of /etc/nginx/nginx.conf | |
server { | |
listen 80; | |
server_name vvoody.org; | |
location ~ /blog[/]?$ { | |
if ($query_string ~ p=([0-9]+)) { | |
rewrite ^(.*) http://blog.vvoody.org/article/$arg_p? permanent; | |
#set $article_id $1; | |
#rewrite ^(.*) http://blog.vvoody.org/article/$article_id? permanent; | |
} | |
rewrite ^ http://blog.vvoody.org/ permanent; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment