Media data without media directory

Follow me on Telegram for more content. Contact me for business opportunities.

It's not a big trouble, but I wanted to remove the /media/ prefix on all my media links, like...


My Image



and so on.

This can be easily achieved by replacing in apache's configuration file:



SetHandler None



by



SetHandler None



Of course you have to have all you media files in folders like css, js, img... or anything that you specify in last regular expression.

UPDATE: See this post before using this approach.

Show Comments