Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a problem with WordPress links to media files.

It is currently pointing to (which is wrong/won't work/nothing loads): http://mydomain.com/files/2012/10/image_4-1.png

The correct URL is to retrieve the image is (works/image is loaded into browser): http://mydomain.com/wp-content/blogs.dir/5/files/2012/10/image_4-1.png

So, how do I get Cherokee to redirect everything from: http://mydomain.com/files/ to: http://mydomain.com/wp-content/blogs.dir/5/files/

... and note that the "mydomain.com" corresponds to the "5" in the correct URL path.

--

I need either of these solutions:

How do I configure Cherokee Web Server to correctly redirect (rewrite) to the correct URL? (In Cherokee, I'm using Virtual Server, so I can statically map the domain name to the "5" in the correct URL.)

OR,

How do I set the settings within WordPress to correct this situation?

Thanks!

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Yup, I have resolved this problem by rewriting "^/files/(.*)" to "http://mydomain.com/wp-content/blogs.dir/5/files/$1" (Cherokee redirection).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.