Question on rewriting ...

Maxim Dounin mdounin at mdounin.ru
Sat Sep 8 01:19:34 MSD 2007


Hello!

On Fri, 7 Sep 2007, Rakhesh Sasidharan wrote:

[...]
>> With this config, it returns rss feed for /feed/rss, atom feed for 
>> /feed/atom, and rss feed again for /feed/no-such-feed. Looks like what you 
>> are trying to achive.
>> 
>> Versions: WordPress 2.2.2, nginx 0.6.10.
>
> Yup, that's exactly what I want to achieve. Cool!
>
> In my config, SCRIPT_FILENAME is set to 
> /path/to/wordpress/$fastcgi_script_name. I didn't test out by changing it to 
> $document_root/$fastcgi_script_name, will do once I get back to that machine.
>
> Why would changing SCRIPT_FILENAME to the latter make a difference btw? My 
> understanding is that $document_root points to the directive root of the 
> current request, shouldn't that be /path/to/wordpress anyways? Or am I 
> missing something?

SCRIPT_FILENAME should point to wordpress php script to run, exact syntax
before variable substitution doesn't matter. I've just bored typing and so 
used $document_root as a shortcut.

Maxim Dounin





More information about the nginx mailing list