|
|||
|
I want to implement the parameter in action which has slash /
e.g. http:// domain.com/controller/action --> http:// domain.com/video/videostore/local/diehard.mov here, video is controller and videostore/local/diehard.mov is the location of the video storage path. that's why I should use slash. I have setup the router path $route_2 = new Zend_Controller_Router_Route( ':controller_name/:video_path/*', array( 'controller' => 'videoctrl', 'action' => 'videofilepath' )); Is it possible to use slash as parameter? Thanks a lot. |
|
|||
|
I'll answer in two parts, first i'll reask the question that was asked by xentek above. And second I'll give a solution that you can use assuming the answer to the question above is negative.
So what xentek was asking above is that if you have two requests for two different videos would the two seperated requests both begin with the path 'videostore/local/'? Example: http:// domain.com/video/videostore/local/diehard.mov http:// domain.com/video/videostore/local/diehard2.mov If the above is true, then what you should do is hard code the path ('videostore/local/') in a variable inside your controller so that the requests can be written as: http:// domain.com/video/diehard.mov http:// domain.com/video/diehard2.mov Now if the above is false the solution would be to encode parameter somehow before creating the link. One such solution would be using base64 encoded strings (see base64_encode/base64_decode) If encoding the parameter it would now look like: http:// domain.com/video/VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw== If SEO is a factor or you for some reason think that url is confusing you could use urlencode, or any other form of encoding, instead. Hope this helps.. Last edited by Leif.Högberg : 02-29-2008 at 01:33 PM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|