Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I hope my title makes sense. Here is what I have: On our previous website, we had URLs similar to the following:


This same file on our new site has the structure:


However our new site also has a page located at:


so I cannot use something like ^/support/(.*) as it rewrites and breaks the main support page. I am looking for any suggestions. I thought that perhaps the easiest way to handle this would be to ONLY rewrite urls where there is a file extension present? I have been googling for this very thing but haven't really stumbled across a solution as of yet.


share|improve this question
up vote 0 down vote accepted

Looks like you are looking for file-extension based redirects:

RewriteRule ^/(.*\.(zip|jpg|png))$ /wp-content/uploads/$1 [L]

not sure of the correct syntax with folders, but in theory this should work...

share|improve this answer
Thank you! I had to modify it just a bit but it seems to do exactly what I needed :) – Dewayne May 8 '13 at 20:28

how is actual rule for www.example.com/support ? i would suggest to create a rule that only apply to that URL [and redirects to the very same page], add a [L] command flag and THEN insert the ^/support/(.*) statement

share|improve this answer

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.