My WordPress installation is in the directory /blog/. I've successfully added the custom post type case_study in functions.php using this code: http://pastebin.com/rFwkfUmV
which gave this permalink structure:
.../blog/?case_study=hello-world
I changed the rewrite argument to
'rewrite' => true,
which successfully changed the permalink structure to:
.../blog/case_study/hello-world/
but it gives a 404 error saying
You tried going to .../blog/blog/case_study/hello-world/, and it doesn't exist.
I then modified it again like so:
'rewrite' => array('slug' => 'case_study', 'with_front' => true, ),
and still got the same 404.
Any idea on how to fix this?