Forum Moderators: phranque

Message Too Old, No Replies

Redirect directory but not sub directories of that directory

         

sexytink

1:32 pm on Mar 10, 2007 (gmt 0)

10+ Year Member



Hope that makes sense.

I apologize if this has been asked over and over. I have looked and am having a hard time understanding what I should be doing. A simple htaccess command or a rewrite.

I have directories such as this.

gallery
gallery/templates
gallery/templates/skyblue
gallery/templates/skyblue/images
gallery/templates/skyblue/icons
gallery/templates/skyblue/images_english
gallery/templates/skyblue/media

I want to be able to redirect the gallery/templates/skyblue folder but NOT the images, etc folders as the images in these are called upon by html files within the skyblue directory.

Could anyone point me in the right direction as to what I should use?

Thanks so much

jdMorgan

2:38 pm on Mar 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Use mod_rewrite, with a RewriteCond that excludes files ending in .jpg, .gif, etc. from being redirected by the RewriteRule.

For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].

Jim