Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
nginx WordPress pretty URLs
server {
index index.php;
server_name .kyle-gibson.com;
location /blog {
if (!-e $request_filename) {
rewrite ^/blog/(.+)$ /blog/index.php/$1 last;
}
}
location ~* \.php(/.*)?$ {
include /etc/nginx/fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
if (-e $document_root$fastcgi_script_name) {
fastcgi_pass 127.0.0.1:9000;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment