nginx:从url中删除/索引

时间:2015-05-25 17:17:28

标签: php zend-framework nginx

我设置了在nginx上运行的Zend Framework 1应用程序。重写按预期工作,但主页mysite.com重定向到mysite.com/index。如何删除/索引?

这是vhost配置:

server {
  listen 80;
  server_name local-mysite.com;
  root /var/www/mysite/public_html;

  location / {
   try_files $uri $uri/ /index.php$is_args$args;
  }

  # PHP scripts will be forwarded to fastcgi processess.
  location ~ \.php$ {
   include /etc/nginx/fastcgi_params;

    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
  }
}

1 个答案:

答案 0 :(得分:0)

如果这是你的所有nginx配置,它必须是与Zend Framework相关的东西。

请看一下这个讨论:

Zend Framework - Redirect to routed direction