mirror of
https://github.com/phanan/htaccess.git
synced 2018-11-08 13:39:40 +01:00
Adding a snippet on how to exclude a URL from redirection (#90)
* rewrite and redireciton: add snippet for excluding a url * formatting
This commit is contained in:
parent
7a90f19987
commit
191fada5a5
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue