Rewrite
Edho Arief
edho at myconan.net
Fri Apr 20 00:44:57 UTC 2012
2012/4/20 Silvio Siefke <siefke_listen at web.de>:
> On Fri, 20 Apr 2012 06:56:51 +0700
> Edho Arief <edho at myconan.net> wrote:
>
>> 1. you forgot to put ~ for regex match
>> 2. the one you want is rewrite/return, not try_files
>
> Thanks for help. So i have from this list, with the html files it run.
> But nginx want not use html inside php so i must change the rule.
>
>> something like this may work:
>>
>> location ~ ^/article-(\d+)\.php$ {
>> rewrite ^ /post.php?id=$1 last;
>> }
>
> Is the same, i become "File not found".
>
Put the block before all other locations.
More information about the nginx
mailing list