This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Day 7 URL problem

Discussion around this tutorial for symfony 1.0.x

Day 7 URL problem

by adamli » Thu Jul 31, 2008 9:06 am

adamli
Member
 
Posts: 50
Joined: Tue Jul 22, 2008 7:55 am
Location: Germany

Re: Day 7 URL problem

by DBA_Alex » Fri Aug 01, 2008 3:24 pm

How do you have the routing set up in routing.yml?
Currently Using
---------------------------
Symfony 1.4/Doctrine 1.2
MySQL 5.1
DBA_Alex
Faithful Member
 
Posts: 276
Joined: Mon Jul 28, 2008 4:59 pm
Location: North Carolina, USA

Re: Day 7 URL problem

by richrosa2 » Sun Oct 12, 2008 5:40 pm

I have the same problem.

# default rules
popular_questions:
url: /index/:page
param: { module: question, action: list }

question:
url: /question/:stripped_title
param: { module: question, action: show }

homepage:
url: /
param: { module: question, action: list }

default_symfony:
url: /symfony/:action/*
param: { module: default }

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

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

login:
url: /login
param: { module: user, action: login }

recent_questions:
url: /question/recent/:page
param: { module: question, action: recent, page: 1 }
richrosa2
Junior Member
 
Posts: 8
Joined: Sun Oct 12, 2008 5:38 pm

Re: Day 7 URL problem

by richrosa2 » Sun Oct 12, 2008 5:47 pm

I changed routing from SVN. I copied it below. However when I use the following URL it fails:

http://askeet/question/recent

but when I use the trailing slash, it works.

http://askeet/question/recent/

Is there anything in routing that would make that difference?

# question
question:
url: /question/:stripped_title
param: { module: question, action: show }

popular_questions:
url: /index/:page
param: { module: question, action: list }

recent_questions:
url: /recent
param: { module: question, action: recent }

# answers
answers:
url: /question/:stripped_title/page/:page
param: { module: question, action: show, page: 1 }

# login
login:
url: /login
param: { module: user, action: login }

# default rules
homepage:
url: /
param: { module: question, action: list }

default_symfony:
url: /symfony/:action/*
param: { module: default }

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

default:
url: /:module/:action/*
richrosa2
Junior Member
 
Posts: 8
Joined: Sun Oct 12, 2008 5:38 pm

Re: Day 7 URL problem

by halfer » Mon Oct 13, 2008 11:46 am

@richrosa2 - please use [code] tags for YAML, otherwise readers can't see if you've got your indentation correct.
halfer
Faithful Member
 
Posts: 10148
Joined: Mon Jan 30, 2006 1:16 pm
Location: West Midlands, UK