andy_s
(Arekandrei)
December 7, 2011, 3:21pm
21
I see it works, but also I see now we are talking about different things. You talk about creating urls and I talk about parsing them All urls are created fine, but when the request “toronto/downtown/restaurants” comes, action details/showByFoods is running (instead of restaurants/showByArea).
khaperey
(Khaperey)
December 7, 2011, 3:50pm
22
andy_s:
I see it works, but also I see now we are talking about different things. You talk about creating urls and I talk about parsing them All urls are created fine, but when the request “toronto/downtown/restaurants” comes, action details/showByFoods is running (instead of restaurants/showByArea).
Hi, guys thanks for test project where we can understand very easily and I did some changes and all links goes to one controller/action instead of different.
Please download test project and see the result.
jacmoe
(Jacob Moena)
December 7, 2011, 3:54pm
23
andy_s:
I see it works, but also I see now we are talking about different things. You talk about creating urls and I talk about parsing them All urls are created fine, but when the request “toronto/downtown/restaurants” comes, action details/showByFoods is running (instead of restaurants/showByArea).
No. The right action is run.
I told you I tested it.
Creating and parsing urls works.
[color=#1C2837][size=2][quote name="khaperey"]Please download test project and see the result.
[/quote]
[/size][/color]
[color=#1C2837][size=2]I really don’t have the time to download and test - why don’t you just post the code? [/size][/color]
khaperey
(Khaperey)
December 7, 2011, 4:17pm
24
jacmoe:
No. The right action is run.
I told you I tested it.
Creating and parsing urls works.
[color=#1C2837][size=2][/size][/color]
[color=#1C2837][size=2]I really don’t have the time to download and test - why don’t you just post the code? [/size][/color]
Hi jacmoe , did you download test project where I made some changes and the results show as Andy’s says in his last post.
jacmoe
(Jacob Moena)
December 7, 2011, 4:34pm
26
I did just now. Nice work!
andy_s
(Arekandrei)
December 7, 2011, 4:48pm
27
So, how are you going to solve the problem? You can make only one action for all kinds of aliases or add some information into url rules to distinguish them, e.g.: <cityAlias:.>/restaurants/food/<foodAlias:. >.
khaperey
(Khaperey)
December 7, 2011, 5:01pm
28
andy_s:
So, how are you going to solve the problem? You can make only one action for all kinds of aliases or add some information into url rules to distinguish them, e.g.: <cityAlias:.>/restaurants/food/<foodAlias:. >.
As our problem is first alias e.g. <cityAlias:.*>
My task is to make user and SEO friendly urls.
our first priority is to get this SEO urls.
mydomain/toronto/restaurants/sushi.htm
mydomain/toronto/downtown/restaurants.htm
mydomain/toronto/restaurants/free-wifi.htm
if we could get these so any idea to some nice and SEO friendly urls?
what about this
toronto.mydomain/restaurants/sushi.htm
toronto.mydomain/downtown/restaurants.htm
toronto.mydomain/restaurants/free-wifi.htm
What you guys says about this as <cityAlias:.*> comes on subdomain position.
jacmoe
(Jacob Moena)
December 7, 2011, 6:31pm
29
Now I used these rules:
'restaurants/<cityAlias>/food/<foodAlias>'=>'details/showByFoods',
'restaurants/<cityAlias>/feature/<featureAlias>'=>'restaurants/showByFeatures',
'restaurants/<cityAlias>/area/<areaAlias>'=>'restaurants/showByArea',
Gives me:
restaurants/toronto/food/sushi.html => details controller
restaurants/toronto/area/downtown.html => restaurants controller, showByArea action
restaurants/toronto/feature/wifi.html => restaurants controller, showByFeature action
I think I know why it works now: all rules need to be slightly different - food, feature and area makes them un-same.
jacmoe
(Jacob Moena)
December 8, 2011, 9:45pm
30
And … ?
Does it work?
I am curious.
Since we are a couple of guys who put some effort into solving this, it would be prudent to at least give some feed-back.
khaperey
(Khaperey)
December 9, 2011, 2:58pm
31
Hi there, I’m really sorry for not getting back to you fast as I was out from pc for a while and now here is result.
Jacmoe yes your tricks works and we implemented but not yet finalized by others members too but I’m sure about 80% that our team members will go on your suggested way.
jacmoe and Andy’s I really thankful for both of your efforts and time you guys tried to solve this solution and I give 5 points to you guys
Have a good weekends
Jan
jacmoe
(Jacob Moena)
December 9, 2011, 4:43pm
32
That sounds awesome!
I think the URLs are SEO friendly, but they can be tweaked as long as they’re slightly different.
If you want give us points, click the plus button…