wp rewrite on nginx
|| Permalink wordpress
0. Go to Permalinks
1. Common settings – Custom Structure : /%postname%/ or /%category%/%postname%/
2. Save Changes
|| Setup nginx for permalink on wordpress
add this line on nginx.conf or vhost conf file:
if (!-e $request_filename) { rewrite ^(.*)$ /index.php?q=$1 last; break; }
so on nginx.conf / vhost website like:
location / { root /var/html; index index.php index.html index.htm; # permalink wp if (!-e $request_filename) { rewrite ^(.*)$ /index.php?q=$1 last; break; } }
|| Restarting nginx
# /etc/init.d/nginx restart