diff --git a/README.md b/README.md index aa6fa42..99e1d94 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ What we are doing here is mostly collecting useful snippets from all over the in - [Alias Paths to Script](#alias-paths-to-script) - [Redirect an Entire Site](#redirect-an-entire-site) - [Alias "Clean" URLs](#alias-clean-urls) + - [Exclude a URL from Redirection](#exclude-url-from-redirection) - [Security](#security) - [Deny All Access](#deny-all-access) - [Deny All Access Except Yours](#deny-all-access-except-yours) @@ -184,6 +185,13 @@ RewriteRule ^([^.]+)$ $1.php [NC,L] ``` [Source](http://www.abeautifulsite.net/access-pages-without-the-php-extension-using-htaccess/) +### Exclude URL from Redirection +This snippet allows you to exclude a URL from redirection. For example, if you have redirection rules setup but want to exclude robots.txt so search engines can access that URL as expected. +``` apacheconf +RewriteEngine On +RewriteRule ^robots.txt - [L] +``` + ## Security ### Deny All Access ``` apacheconf