How to hide /wp-content/uploads/ from URL?

I have a WordPress mulitsite and I want to hide the /wp-content/uploads/ part form URL in images and files.

The url now like this:
http://localhost/wordpress/teszt3/wp-content/uploads/sites/3/2015/05/VCC.jpg

I want to this:
http://localhost/wordpress/teszt3/sites/3/2015/05/VCC.jpg

I try this in .htacces, but not working:

RewriteRule ^files$ /wp-content/uploads/sites/3/2015/05/VCC.jpg [L,QSA]

and this:

RewriteRule ^wp-content/uploads/(.+)$ http://localhost/wordpress/teszt3/$1 [R=301,L]

1 Answer
1

Had you considered actually moving the folder?

WordPress allows to customize location of whole content folder or parts of it either.

According to moving uploads folder in Codex, as simple as:

define( 'UPLOADS', 'blog/wp-content/uploads' );

Leave a Comment