For quite a while now, Iâ€™ve been thinking that the original directory structure I chose for my website didnâ€™t quite match my needs. The only problem was, I didnâ€™t want to break any links that already point to existing documents in those directories. The directories I wanted to move were /xhtml/, /css/, /zengarden/ and /script/. I wanted to put zengarden under CSS, and group the XHTML, CSS and Script directories under a single development directory, which I decided to call /dev/.
Redirect permanent /xxx http://www.lachy.id.au/dev/xxx
Where xxx represents the XHTML, CSS, Script and ZenGarden directories. This directive causes Apache to respond with an HTTP
301 Moved Permanently status code, and the location for the user agent to find the actual resource. The only problem is that I needed to use the full URI, rather than a relative path for the redirection, which means that the same directives wonâ€™t work as I wanted for my testing server on my localhost, since any request for http://localhost/css/, for example, will redirect to http://www.lachy.id.au/dev/css/, rather than http://localhost/dev/css/.
So, the problem is solved, and Iâ€™ve got a much more appropriate, and hopefully permanent directory structure. This will benefit a lot for my CSS Zen Garden submission, Office 2003, which is listed in the Themes and Look-alikes section. It still uses the old URI, so if it broke, anyone wanting to see my design would be disappointed to see an unstyled document. There are also several other links on various other sites that I know about, and possibly others that I donâ€™t, so it was very important that existing URIs didnâ€™t break.