»
S
I
D
E
B
A
R
«
WordPress on Nginx Permalinks giving you 403?
August 4th, 2010 by Simon

I am running Magento and a WordPress blog on Nginx. URL rewriting was working fine on Magento, but whenever I added a location block for /blog/ with the rewrite rule in it, I got a 403 error for the blod directory.

It turns out that this is because you have redeclare the default files for this directoy, then do the rewrite, like so:

location /blog/ {
index index.html index.php;
expires 30d;
if (!-e $request_filename) {
rewrite . /blog/index.php last;
}
}


Comments are closed

»  Substance: WordPress   »  Style: Ahren Ahimsa