[Flow] Routing: Remove vendor.package from URL
Carsten Bleicker
carsten at bleicker.de
Sat May 24 13:40:33 CEST 2014
Think you will run with this into non unique routes.
f.e.
package1/foo
package2/foo
both will end up in My.Package
so if you have 2 packages you will never reach foo controller of package2 because route matches for package1.
Am 24.05.2014 um 13:37 schrieb David Sporer <david.sporer at gmail.com>:
> Thank you very much!
> This one seemed to do the trick:
>
> -
>
> name: 'Default Route'
> uriPattern: '{@controller}(/{@action})'
> defaults:
> '@package': 'My.Package'
> '@action': 'index'
> '@format': 'html'
> appendExceedingArguments: true
>
>
> Need to do some more tests if everything's still working but it seems so :-)
>
>
> 2014-05-24 12:59 GMT+02:00 Carsten Bleicker <carsten at bleicker.de>:
>
>> Maybe do it like the flows default routes.
>> Use them in your routes and replate {@package} in the uri-pattern by your
>> packagekey you want, d.e. 'packageKeyWithtoutDot'.
>> and add after this to defaults
>>
>> But maybe there is a better solution.
>> Never trust me ;)
>>
>> Am 24.05.2014 um 12:49 schrieb David Sporer <david.sporer at gmail.com>:
>>
>>> Hi Carsten,
>>>
>>> thank you! But your example means that I still have to create a Route
>> for every Action where I want to have nice URLs right?
>>>
>>> Haben't tried it yet but will do later.
>>>
>>> Regards
>>> David
>>>
>>>
>>>> Am 24.05.2014 um 10:36 schrieb "Carsten Bleicker" <carsten at bleicker.de
>>> :
>>>>
>>>> Hi David,
>>>> dont know, is this realy a good practice, but i did it like this:
>>>> https://gist.github.com/pumatertion/1a12c0b784525c110193
>>>>
>>>>
>>>> ----------------------
>>>>
>>>> Carsten Bleicker
>>>> Wülfingstraße 1
>>>> 42477 Radevormwald
>>>>
>>>> E-Mail: carsten at bleicker.de
>>>> Web: www.bleicker.de
>>>> Twitter: @carstenbleicker
>>>> Jabber: cbleicker at jabber.ccc.de
>>>> Telefon: +49 (0)171-2690845
>>>>
>>>>> Am 24.05.2014 um 10:14 schrieb David Sporer <david.sporer at gmail.com>:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I'm really sure that this question has already been asked but I wasn't
>> able
>>>>> to find the answer.
>>>>> Is it possible to remove the Package and Vendor name from the URL?
>>>>>
>>>>> E.g. domain.com/vendor.package/controller/action
>>>>> Should always be domain.com/controller/action and default to my
>> package.
>>>>>
>>>>> How can this be done?
>>>>>
>>>>> Thanks
>>>>> David
>>>>> _______________________________________________
>>>>> Flow mailing list
>>>>> Flow at lists.typo3.org
>>>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>>>>
>>>> _______________________________________________
>>>> Flow mailing list
>>>> Flow at lists.typo3.org
>>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>>> _______________________________________________
>>> Flow mailing list
>>> Flow at lists.typo3.org
>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>>
>>
>> _______________________________________________
>> Flow mailing list
>> Flow at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>>
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
More information about the Flow
mailing list