software:webdesign:htaccess
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| software:webdesign:htaccess [2011/05/15 18:19] – superwizard | software:webdesign:htaccess [2017/10/13 04:59] (current) – superwizard | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== | ||
| + | |||
| + | From: https:// | ||
| + | |||
| + | < | ||
| + | Specifically, | ||
| + | |||
| + | Htaccess allows for decentralized management of Web Server configurations | ||
| + | </ | ||
| + | |||
| + | |||
| + | ====== For setting up https SSL access for a website Drupal in particular ====== | ||
| + | |||
| + | [[service: | ||
| + | |||
| + | |||
| + | ====== What Can it Do ====== | ||
| + | |||
| + | There is a huge range of things .htaccess can do including: password protecting folders, redirecting users automatically, | ||
| + | |||
| + | http:// | ||
| + | |||
| + | ====== allowoverride ====== | ||
| + | |||
| + | http:// | ||
| + | |||
| + | |||
| + | |||
| + | |||
| ====== htaccess Cheatsheet ====== | ====== htaccess Cheatsheet ====== | ||
| http:// | http:// | ||
| + | |||
| + | ====== Access control ====== | ||
| + | |||
| + | http:// | ||
| + | |||
| + | In 2.2, access control based on client hostname, IP address, and other characteristics of client requests was done using the directives Order, Allow, Deny, and Satisfy. | ||
| + | |||
| + | **In 2.4, such access control is done in the same way as other authorization checks, using the new module mod_authz_host. The old access control idioms should be replaced by the new authentication mechanisms, although for compatibility with old configurations, | ||
| + | |||
| + | Order Directive | ||
| + | |||
| + | http:// | ||
| + | |||
| + | **Ordering is one of:** | ||
| + | |||
| + | **Allow, | ||
| + | First, all Allow directives are evaluated; at least one must match, or the request is rejected. | ||
| + | Next, all Deny directives are evaluated. If any matches, the request is rejected. | ||
| + | Last, any requests which do not match an Allow or a Deny directive are denied by default. | ||
| + | **Deny, | ||
| + | First, all Deny directives are evaluated; if any match, the request is denied | ||
| + | unless it also matches an Allow directive. | ||
| + | Any requests which do not match any Allow or Deny directives are permitted. | ||
| + | **Mutual-failure** | ||
| + | This order has the same effect as Order Allow,Deny and is deprecated in its favor. | ||
| + | |||
| + | .htaccess is most often used to restrict or deny access to individual files and folders. | ||
| + | A typical example would be an " | ||
| + | they like, but you don't want users accessing these files directly, over the web. In that case you | ||
| + | would drop an .htaccess file in the includes folder with content something like this.. | ||
| + | |||
| + | NO ENTRY! | ||
| + | < | ||
| + | # no one gets in here! | ||
| + | deny from all | ||
| + | </ | ||
| + | |||
| + | Order the processing of the allow and deny directives | ||
| + | |||
| + | http:// | ||
| + | |||
| + | < | ||
| order allow,deny | order allow,deny | ||
| + | </ | ||
| + | |||
| + | Satisfy Directive | ||
| + | |||
| + | http:// | ||
| < | < | ||
| Line 27: | Line 103: | ||
| </ | </ | ||
| </ | </ | ||
| + | |||
| + | ====== .htaccess tips and tricks ====== | ||
| + | |||
| + | http:// | ||
| + | |||
| + | What are .htaccess files anyway? | ||
| + | Simply put, they are invisible plain text files where one can store server directives. Server directives are anything you might put in an Apache config file (httpd.conf) or even a php.ini**, but unlike those " | ||
| + | |||
| + | == redirecting and rewriting == | ||
| + | |||
| + | http:// | ||
| + | |||
software/webdesign/htaccess.1305483584.txt.gz · Last modified: by superwizard
