Gogo, on 15 April 2014 - 07:13 AM, said:
I have directory 'upload/download' in my project root. And I add controller/action - UploadController and actionDownload on it.
What I want is when user hit the url '/myproject/upload/download' to execute controller action instead to open directory 'upload/downlpoad'. I have to keep the same names.
My structure is:
- project root
- -->controllers ... and so on.
I try with urlManager but without success.
I am not shure is it possible or how to do it?
To expand on something said above: I think the problem is that you have a directory AND a controller called 'upload' The .htaccess first looks to see is the user is requesting a file or directory that exists...THAN sends off to index.php.
Try changing the name of your 'upload' directory, or the structure to something like
Another option that I have seen quite often is to store the files in protected then use a proxy action to send to user. The link tag would call the controllerId/actionId passing an identifier to which file to send.
Do, or do not. There is no 'try.' Jedi Master Yoda