Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I found that the following code online could be used to spoof the WordPress uploads folder, rewriting URLs to a different folder on the server:

# BEGIN Spoof wp-content/uploads directory
RedirectMatch 301 ^/uploads/(.*)$ https?://$1
# END Spoof wp-content/uploads directory

It is my understanding that under Media settings page the 'Full Path to files' needs to point to desired spoof folder.

I have tried using the above code but WordPress throws a error 404. My uploads are set to be organized by year and month. The file was that uploaded and tested indeed exists on the server.

Here is an example of the structure setup:

Real folder path -> Spoofed folder path ->

My question: Is there anything wrong with the rewrite code that could lead to the error 404 issue?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

yes, this:


doesn't do anything you want, just make it Next to that, make sure your server actually supports RedirectMatch.

share|improve this answer
Thanks, Joost! I am not even why I had that in there in the first place, but removing it was the solution. – seancojr Oct 7 '11 at 0:14

Your Answer


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.