-
Notifications
You must be signed in to change notification settings - Fork 107
Making Wordless work with Nginx
endorama edited this page Jun 7, 2012
·
1 revision
When using Nginx as web server for serving the WordPress installation with Wordless you have to make sure that css and js requests are correctly redirected to the Wordless plugin.
As @emzo has found out, in the example given on the WordPress Codex for and Nginx configuration there is an offending part:
# Directives to send expires headers and turn off 404 error logging.
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires 24h;
log_not_found off;
}
To make Wordless work you need to edit this part, and make it look like this ( thanks @emzo for the solution ):
# Send js and css requests to Wordless
location ~* \.(js|css)$ {
try_files $uri /index.php?$args;
}
# Directives to send expires headers and turn off 404 error logging.
location ~* \.(png|jpg|jpeg|gif|ico)$ {
expires 24h;
log_not_found off;
}
This will correctly redirect all css/js requests to Wordless while leaving untouched other requests.