2011-09-19 45 views
0

我有一个symfony应用程序(1.4版),我在它创造了后端应用程序和模块。但无法联系到他们。我想与像一个链接到达模块:无法到达后端模块;路由问题

项目名称/管理/主

项目名称是一个别名,在WAMP的服务器已经设置并在前端工作正常。 管理只是一个标签,指定我们在后端部分。 main是一个模块作为后端应用程序的主页。 内部的routing.yml的(C:\瓦帕\ WWW \项目名称\应用\后端\配置\ routing.yml中)为:

homepage: 
    url: /:management 
    param: { module: main, action: index } 

# generic rules 
# please, remove them by adding more specific rules 
default_index: 
    url: /management/:module 
    param: { action: index } 

default: 
    url: /management/:module/:action/* 

但它给 “找不到网页-404” error.Where是错误或有任何额外的东西我应该做的,感谢您的帮助..

回答

0

您创建了两个应用程序。相关的“前端控制器”文件的真正路径是什么?

前端

我想:

是它对?

后端

什么后台?

  • 1)C:\瓦帕\ WWW \项目名称\网络\管理\的index.php
  • 2)C:\瓦帕\ WWW \项目名称\网络\ backend.php

案例1:

网址:http://projectname/management/index.php

(您可以省略 “的index.php” 如果的.htaccess配置正确,很明显。)

的routing.yml:

homepage: 
    url: /
    param: { module: main, action: index } 

default_index: 
    url: /:module 
    param: { action: index } 

default: 
    url: /:module/:action/* 

案例2:

网址:http://projectname/backend.php/management

routing.yml:

homepage: 
    url: /management 
    param: { module: main, action: index } 

default_index: 
    url: /management/:module 
    param: { action: index } 

default: 
    url: /management/:module/:action/* 
+0

此网址(http:// projectname/b ackend.php /管理)的作品,谢谢:)但我怎样才能达到通过“http://项目名称/管理”? – dnur

+0

你必须设置第一个案例。 “管理”必须是一个真正的目录。让我知道。 – Davide