Nginx rewrite to PHP
B.R.
reallfqq-nginx at yahoo.fr
Sun Apr 22 02:11:14 UTC 2012
Hi,
I'm using Nginx linked to PHP using fastcgi proxy (to the FPM module of PHP
core btw).
I am trying to use some rewrite rules, which apparently work since I get
redirected (HTTP answer 200), but the content is not passed through the PHP
handler...
I am returned the file for downloading which content is the raw PHP code!
I am using a configuration like the following:
location / {
rewrite ^/dunno/([^\.^/]+)$ /index.php?q=$1 break;
return 404;
}
location ~ \.php$ {
// PHP handling there
}
What am I doing wrong?
---
*B. R.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20120421/0b5d5da7/attachment-0001.html>
More information about the nginx
mailing list