Skip to content

NGINX server config

robiso edited this page Mar 28, 2017 · 19 revisions

Paste the below code into your NGINX server config.

location ~ database.js { return 403; }

autoindex off;

location / { if (!-e $request_filename) { rewrite ^/(.+)$ /index.php?page= last; } }

The code above replicates Apache's htaccess functionality with the power of your NGINX server config. Since NGINX doesn't have the "traditional" htaccess file, this is necessary to make WonderCMS work properly.


NOTE: The code above is required to deny access to database.js and make clean URL's which are SEO friendly.


Clone this wiki locally