Redirect images (other media) content to live production site

During some redesign projects it’s handy to have the images (other media) rendered, but sometimes it could be a struggle to download from specific paths.

For WordPress sites I use the following htaccess rule:

RedirectMatch 301 /wp-content/uploads/(.*)$ http://www.example.com/wp-content/uploads/$1

Than for other, custom stuff:
RedirectMatch 301 /media/(.*)$ http://www.example.com/media/$1

Advertisements

About Michal Zuber

Biker and rollerblader. Owner and developer at http://nevilleweb.sk/ Co-founded http://neville.sk/ Blog at https://michalzuber.wordpress.com/
This entry was posted in wordpress and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s