From f4dae32bdcd8d8cd07df6b3a58fe2fa32d57a703 Mon Sep 17 00:00:00 2001 From: Jacob Williams Date: Wed, 6 Mar 2013 12:19:39 -0600 Subject: [PATCH] Add instructions to Nginx rewrite config Prevent problems when plugins include direct-access php files. --- doc/rewrites.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/rewrites.md b/doc/rewrites.md index 87b9d5f..dec00b7 100644 --- a/doc/rewrites.md +++ b/doc/rewrites.md @@ -18,6 +18,8 @@ If HTML5 Boilerplate's `.htaccess` support is enabled in `lib/config.php`, then ### Nginx +Include these in your Nginx config, before the PHP fastcgi block (`location ~ \.php$`). + location ~ ^/assets/(img|js|css)/(.*)$ { try_files $uri $uri/ /wp-content/themes/roots/assets/$1/$2; } @@ -32,4 +34,4 @@ If HTML5 Boilerplate's `.htaccess` support is enabled in `lib/config.php`, then "^/js/(.*)$" => "/wp-content/themes/roots/js/$1", "^/img/(.*)$" => "/wp-content/themes/roots/img/$1", "^/plugins/(.*)$" => "/wp-content/plugins/$1" - ) \ No newline at end of file + )