Reputation: 71
I use phalcon-dev-tools-v2.0.13 create a project named test
,I accessed root url "/"
,it worked!then,I change some code like this:
it worked!
but:
i add another url ,it didn't work!
what's the matter? I'm a Phalcon fresher,i followed the Phalcon doc.
My system is php5.6.30
Phalcon2.0.13
, nginx
conf file is:
server {
listen 80;
server_name test;
root /Users/ryugou/test/public;
index index.php index.html index.htm;
charset utf-8;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index /index.php;
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}
Upvotes: 0
Views: 442
Reputation: 4526
your problem is on nginx configuration file. You are not passing _url on location block-
modify location block as (careful last part)-
location / {
try_files $uri $uri/ /index.php?_url=$uri&$args;
}
check Phalcon Nginx Config
Upvotes: 2