How do I redirect all requests to files in the root folder to point to another folder?

Posted by purpletonic on Server Fault See other posts from Server Fault or by purpletonic
Published on 2010-04-01T09:36:18Z Indexed on 2010/04/01 9:43 UTC
Read the original article Hit count: 486

I've moved all of my files from the root of my website into a subfolder, I'd like to do an Apache redirect to point to the files without affecting the other subfolders in my site.

E.g.
/index.html -- redirect to --> /subfolder1/index.html
/file1.html -- redirect to --> /subfolder1/index.html

/subfolder2/index.html -- No redirect

Can anyone help me with the redirect rule that I need to write for this. Thanks,

© Server Fault or respective owner

Related posts about apache

Related posts about mod-rewrite