From 72cd2ccdec0622d92b9e2e57aec56032b2962de2 Mon Sep 17 00:00:00 2001 From: Alex Weissman Date: Mon, 9 Feb 2015 11:54:03 -0500 Subject: [PATCH] Update README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c4bf5f..3a99feb 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ A collection of useful .htaccess snippets, all in one place. I decided to create - [Force HTTPS Behind a Proxy](#force-https-behind-a-proxy) - [Force Trailing Slash](#force-trailing-slash) - [Redirect a Single Page](#redirect-a-single-page) + - [Redirect a Single Directory](#redirect-a-single-directory) - [Redirect an Entire Site](#redirect-an-entire-site) - [Security](#security) - [Deny All Access](#deny-all-access) @@ -91,6 +92,11 @@ Redirect 301 /oldpage2.html http://www.yoursite.com/folder/ ``` [Source](http://css-tricks.com/snippets/htaccess/301-redirects/) +### Redirect a Single Directory +``` apacheconf +#RewriteRule ^source-directory/(.*) target-directory/$1 +``` + ### Redirect an Entire Site ``` apacheconf Redirect 301 / http://newsite.com/ @@ -354,4 +360,4 @@ AddHandler application/x-httpd-php55 .php # Alternatively, you can use AddType AddType application/x-httpd-php55 .php -``` \ No newline at end of file +```