How to custom url

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 :D 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.

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]

Hi jacmoe, did you download test project where I made some changes and the results show as Andy’s says in his last post.

Actually, you are right. :)

I stand corrected.

I did just now. Nice work! :D

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.

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:

I think I know why it works now: all rules need to be slightly different - food, feature and area makes them un-same. :)

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. ;)

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 :D

Have a good weekends

Jan

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…