meta data for this page
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| wiki:dokuwiki-rewrite-rules [21/05/2019 08:25] – créée - modification externe 127.0.0.1 | wiki:dokuwiki-rewrite-rules [30/07/2023 08:10] (current) – [Default rules explained] ztrulphcs | ||
|---|---|---|---|
| Line 46: | Line 46: | ||
| These are the default rules, presented in '' | These are the default rules, presented in '' | ||
| - | - if PATH starts with _media/, give it lib/ | + | - if PATH starts with _media/, give it to '' |
| RewriteRule ^_media/ | RewriteRule ^_media/ | ||
| + | </ | ||
| + | * '' | ||
| + | * The part corresponding to '' | ||
| + | * it is rewritten as '' | ||
| + | * Note that for the ''? | ||
| + | * Our job is done. ie no need to test for the next rewrite rule. Since this rule applied, it is the **L**ast one in this run. That's the role of the '' | ||
| + | * In the end, apache now has to deal with this URL:< | ||
| + | http:// | ||
| </ | </ | ||
| - if PATH starts with _details/, give it to lib/ | - if PATH starts with _details/, give it to lib/ | ||
| RewriteRule ^_detail/ | RewriteRule ^_detail/ | ||
| - | </ | + | </ |
| - | - if PATH starts with _export/ | + | - if PATH starts with _export/**FOO**/, give it to doku.php? |
| RewriteRule ^_export/ | RewriteRule ^_export/ | ||
| + | </ | ||
| + | * '' | ||
| + | * The part corresponding to '' | ||
| + | * The part corresponding to '' | ||
| + | * it is rewritten as '' | ||
| + | * Note that for the ''? | ||
| + | * Our job is done. ie no need to test for the next rewrite rule. Since this rule applied, it is the **L**ast one in this run. That's the role of the '' | ||
| + | * In the end, apache now has to deal with this URL:< | ||
| + | http:// | ||
| </ | </ | ||
| - | - if PATH is empty (ie full URL is just http://www.example.com), | + | - if PATH is empty (ie full URL is just '' |
| RewriteRule ^$ doku.php | RewriteRule ^$ doku.php | ||
| + | </ | ||
| + | http:// | ||
| </ | </ | ||
| - if the PATH does not map to a file< | - if the PATH does not map to a file< | ||
| Line 64: | Line 83: | ||
| </ | </ | ||
| RewriteRule (.*) doku.php? | RewriteRule (.*) doku.php? | ||
| + | </ | ||
| + | http:// | ||
| + | http:// | ||
| </ | </ | ||
| - Because of the tests performed in 5, we are sure that from here on, we deal with an existing file or folder. | - Because of the tests performed in 5, we are sure that from here on, we deal with an existing file or folder. | ||
| - | - if the url/file is index.php, then use doku.php instead of index.php and continue with next rule.< | + | - if the url/file is index.php, then use doku.php instead of index.php and continue with next rule, as there is no '' |
| RewriteRule ^index.php$ doku.php | RewriteRule ^index.php$ doku.php | ||
| - | </ | + | </ |
| + | http:// | ||
| + | http:// | ||
| - There is no more rule, so no special rewrite => just serve the file or folder as usual. | - There is no more rule, so no special rewrite => just serve the file or folder as usual. | ||
| + | |||
| + | |||
| + | Here is presented the same information but more friendly | ||
| + | |||
| + | ^ initial URL ^ rewritten URL | | ||
| + | ^ ::: ^ (what apache will effectively deal with) | | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||