Wordpress Images Subdomain


#1

Hi, In my current Wordpress installation (NON-EE), I’ve set up a sub-domain for my images. So if an image is example.com/wp-content/uploads/… in my blog it is media.example.com/year/month/

So now after moving to Easy Engine, the site is up and running, except for the images. I’m facing so many errors. How do I create a subdomain which points to the directory in which the images are stored?

I could do it at my older host since I had a control panel, but now I don’t and I’m unable to figure out how to do it. Any idea?


#2

EX: I want to redirect links like http://media.ahemahem.com/2014/05/WhatsApp-icon-colorful-150x150.png to http://ahemahem.com/wp-content/uploads/2014/05/WhatsApp-icon-colorful-150x150.png

Not just this link, but all my images. I’ve already changed them in the posts, but since my images with media.ahemahem.com are indexed in Google, I’d like to 301 redirect older images to new one as specified above. What should I do?

Previously I used .htaccess in my old host.


#3

I’m assuming you have created subdomain http://media.ahemahem.com

location ~* \. (png|jpg|jpeg) {  
    return 301 http://ahemahem.com/wp-content/uploads$request_uri;  
}  

The above code return 301 on http://media.ahemahem.com/2014/05/WhatsApp-icon-colorful-150x150.png and take you at http://ahemahem.com/wp-content/uploads/2014/05/WhatsApp-icon-colorful-150×150.png


#4

Hello @sakshamtalwar,

I hope your query is resolved. I am closing this support ticket for now.

Feel free to create a new support ticket if you have any queries further. :slight_smile:


#5