Routing issue CodeIgniter

i have link

http://www.raffaello-test.com/static/frontend/deutsch/mode-bilder/mode-herren-krawatten/gianni-versace-herren-krawatten.jpg

but i need to hide "/static/frontend" remove this part from URL and get get image from this URL

http://www.raffaello-test.com/deutsch/mode-bilder/mode-herren-krawatten/gianni-versace-herren-krawatten.jpg

i think it will be from .htaccess

Answers


One of the option is to create a symlink in the document root.

Second option is to use htaccess rewrite rule. Something like the following should work fine:

RewriteRule ^((deutsch|english)/.+/.+/.+\.(jpe?g|png|gif))$ /static/frontend/$1 [L]

If you have more languages just add them in first parenthesis, like (deutsch|english|russian).

Also note that It's not recommended to use rewriting in high load production for static content, better use symlinks


Need Your Help

STL iterators and 'const'

c++ iterator const

I have a problem with what appears to be some sort of implicit casting to const when I use iterators. I'm not really sure which code is relevant (if I did I probably wouldn't be asking this questio...

MYSQL - Selecting Dates of Current Work Week

php mysql datetime

I'm am writing a PHP program that will get all of the dates for the current work week (excluding Monday). My code is as follows: