Wordpress in a subfolder

Anoop Alias anoopalias01 at gmail.com
Fri Jan 4 13:16:05 UTC 2013


Hi,

I have a setup where there are 2 installations of wordpress .One under /
and one under /wordpress . The configs are as below


##############################
location / {

try_files $uri $uri/ /index.php?q=$uri&$args;

}

location /wordpress {

try_files $uri $uri/ /wordpress/index.php?q=$uri&$args;

}

location ~ \.php$ {
               try_files $uri =404;
               fastcgi_pass unix:/opt/pifpm/fpmsockets/picdn.sock;
               fastcgi_index index.php;
               include fastcgi_params;
        }


######################

The problem is that URL's like http://picdn.com/2013/01/hello-world/ work ;
but not http://picdn.com/wordpress/2013/01/04/hello-world/

The second URL simply redirects to http://picdn.com/2013/01/hello-world/

Here is what the nginx log show
============================================
122.164.61.17 - - [04/Jan/2013:08:14:22 -0500] "GET
/wordpress/2013/01/04/hello-world/ HTTP/1.1" 301 5 "
http://picdn.com/wordpress/" "Mozilla/5.0 (X11; Linux i686)
AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11"
122.164.61.17 - - [04/Jan/2013:08:14:22 -0500] "GET /2013/01/hello-world/
HTTP/1.1" 200 3764 "http://picdn.com/wordpress/" "Mozilla/5.0 (X11; Linux
i686) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97
Safari/537.11"
===========================================


Any idea why this might be happening?


Thanks in advance,
-- 
Anoop P Alias (PGP Key ID : 0x014F9953)
GNU system administrator
http://UniversalAdm.in
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20130104/fc474691/attachment.html>


More information about the nginx mailing list