WordPress in sub-directory is serving root index.php on nginx fastcgi
-
I am encountering a weird problem on my NGINX server.
As explained in the Codex I moved wordpress from my root directory to a subdirectory /blog/.
It shows the blog index successfully, but if I want to show anything else it serves the root index.php
Examples:
https://jascha.io/blog/48-hour-product/
https://jascha.io/blog/blogger-outreach/Even non-existent URLs are served as the root index.php
https://jascha.io/blog/asdkj23/
If I remove the root index.php it returns an 404 error.
Maybe its due to my nginx and fastcgi settings, but I have no clue:
location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_cache microcache; fastcgi_cache_key $scheme$host$request_uri$request_method; fastcgi_cache_valid 200 301 302 30s; fastcgi_cache_use_stale updating error timeout invalid_header http_500; fastcgi_pass_header Set-Cookie; fastcgi_no_cache $no_cache; fastcgi_cache_bypass $no_cache; fastcgi_pass_header Cookie; fastcgi_ignore_headers Cache-Control Expires Set-Cookie; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘WordPress in sub-directory is serving root index.php on nginx fastcgi’ is closed to new replies.