cannot reach backend modules; routing problem
I have a symfony application (version 1.4 ) and I created backend application and modules in it. But can't reach them. I want to reach the modules with a开发者_运维问答 link like:
projectname/management/main
projectname is an alias, already set in wamp server and works properly in frontend. management is just a tag to specify that we are in backend part. main is a module as a homepage of backend app. Inside of routing.yml (C:\wamp\www\projectname\apps\backend\config\routing.yml) is:
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/*
But it gives "Page Not Found-404" error.Where is the mistake or is there any extra thing I should do, thanks for help..
You created two application. What is the real path of the related "front-controller" files?
Frontend
I suppose:
- path: C:\wamp\www\projectname\web\index.php
- url: http://projectname
Is it right?
Backend
What about backend?
- 1) C:\wamp\www\projectname\web\management\index.php
- 2) C:\wamp\www\projectname\web\backend.php
Case 1:
url: http://projectname/management/index.php
(You can omit "index.php" if .htaccess is configured properly, obviously.)
routing.yml:
homepage:
url: /
param: { module: main, action: index }
default_index:
url: /:module
param: { action: index }
default:
url: /:module/:action/*
Case 2:
url: 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/*
精彩评论