Reputation: 1
In inspect element image path is showing like
../wordpress/wp-content/uploads/2014/07/Hydrangeas.jpg
while I want it to show like ../images/Hydrangeas.jpg
by url rewrite.
Is it possible with .htaccess
file?
Upvotes: 0
Views: 235
Reputation: 11808
Use this code in your .htacces file which will achieve what you want.
Redirect 301 /wordpress/wp-content/uploads/2014/07/Hydrangeas.jpg www.example.com/images/Hydrangeas.jpg
Upvotes: 1
Reputation: 335
you'll need to place this snippet in your wp-config.php file:
define( 'UPLOADS', ''.'images' );
there's no need in touching .htaccess
Upvotes: 0