Question

I'm using TinyMCE with a plugin called 'responsive file manager' along with the Yii framework. I'm running into problems while displaying images because of the way Yii's url manager works.

Example:

http://mysite.local/images/image.png

gets treated as a controller / action and it gets a 404 error. Is there a workaround to exclude images / videos / etc from the urlManager in the main config file? I would prefer to avoid modifying the plugin to add Yii's CHtml image() function.

Any ideas?

Update I noticed that yii's url manager only redirects to a controller/action if the images are stored in a child folder, ex.

http://mysite.local/media/images/image.png

instead of

http://mysite.local/media/image.png

However, I still need to have child folders because the file manager handles videos and images, I think it would be less confusing to the user if the structure kept them separated.

Was it helpful?

Solution

Sounds like you are having som problems in your htaccess file.

Does it include something like this?

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php
RewriteRule . index.php
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top