Media data without media directory

You can connect with me on LinkedIn to discuss collaborations and work opportunities.

You can also follow me on Twitter, Bluesky and Mastodon.

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.

You can connect with me on LinkedIn to discuss collaborations and work opportunities.

You can also follow me on Twitter, Bluesky and Mastodon.