Fossil SCM

Some simple documentation on the URL Alias setup page.

drh 2017-09-20 13:21 trunk
Commit a3b689b3cd84d676f2478b69cf19de2d1fad0b0f61668bf7be8810be32b81110
2 files changed +1 -1 +35
+1 -1
--- src/configure.c
+++ src/configure.c
@@ -684,11 +684,11 @@
684684
** accept the -R or --repository option to specify a repository.
685685
**
686686
** %fossil configuration export AREA FILENAME
687687
**
688688
** Write to FILENAME exported configuration information for AREA.
689
-** AREA can be one of: all email project shun skin ticket user
689
+** AREA can be one of: all email project shun skin ticket user alias
690690
**
691691
** %fossil configuration import FILENAME
692692
**
693693
** Read a configuration from FILENAME, overwriting the current
694694
** configuration.
695695
--- src/configure.c
+++ src/configure.c
@@ -684,11 +684,11 @@
684 ** accept the -R or --repository option to specify a repository.
685 **
686 ** %fossil configuration export AREA FILENAME
687 **
688 ** Write to FILENAME exported configuration information for AREA.
689 ** AREA can be one of: all email project shun skin ticket user
690 **
691 ** %fossil configuration import FILENAME
692 **
693 ** Read a configuration from FILENAME, overwriting the current
694 ** configuration.
695
--- src/configure.c
+++ src/configure.c
@@ -684,11 +684,11 @@
684 ** accept the -R or --repository option to specify a repository.
685 **
686 ** %fossil configuration export AREA FILENAME
687 **
688 ** Write to FILENAME exported configuration information for AREA.
689 ** AREA can be one of: all email project shun skin ticket user alias
690 **
691 ** %fossil configuration import FILENAME
692 **
693 ** Read a configuration from FILENAME, overwriting the current
694 ** configuration.
695
+35
--- src/setup.c
+++ src/setup.c
@@ -2422,7 +2422,42 @@
24222422
@ <tr><td>
24232423
@ <input type='hidden' name='namelist' value='%h(blob_str(&namelist))'>
24242424
@ <input type='submit' name='submit' value="Apply Changes">
24252425
@ </td><td></td></tr>
24262426
@ </table></form>
2427
+ @ <hr>
2428
+ @ <p>When the first term of an incoming URL exactly matches one of the "Aliases" on
2429
+ @ the left-hand side (LHS) above, the URL is converted into the corresponding form
2430
+ @ on the right-hand side (RHS).
2431
+ @ <ul>
2432
+ @ <li><p>
2433
+ @ The LHS is compared against only the first term of the incoming URL.
2434
+ @ All LHS entries in the alias table should therefore begin with a
2435
+ @ single "/" followed by a single path element.
2436
+ @ <li><p>
2437
+ @ The RHS entries in the alias table should begin with a single "/" followed by
2438
+ @ a path element, and optionally followed by "?" and a list of query parameters.
2439
+ @ <li><p>
2440
+ @ Query parameters on the RHS are added to the set of query parameters
2441
+ @ in the incoming URL.
2442
+ @ <li><p>
2443
+ @ If the same query parameter appears in both the incoming URL and on the RHS of the
2444
+ @ alias, the RHS query parameter value overwrites the value on the incoming URL.
2445
+ @ <li><p>
2446
+ @ If a query parameter on the RHS of the alias is of the form "X!" (a name followed
2447
+ @ by "!") then the X query parameter is removed from the incoming URL if it exists.
2448
+ @ <li><p>
2449
+ @ Only a single alias operation occurs. It is not possible to nest aliases.
2450
+ @ The RHS entries must be built-in webpage names.
2451
+ @ <li><p>
2452
+ @ The alias table is only checked if no built-in webpage matches the incoming URL.
2453
+ @ Hence, it is not possible to override a built-in webpage using aliases. This is
2454
+ @ by design.
2455
+ @ </ul>
2456
+ @
2457
+ @ <p>To delete an entry from the alias table, changes its name or value to an
2458
+ @ empty string and press "Apply Changes".
2459
+ @
2460
+ @ <p>To add a new alias, fill in the name and value in the bottom row of the table
2461
+ @ above and press "Apply Changes".
24272462
style_footer();
24282463
}
24292464
--- src/setup.c
+++ src/setup.c
@@ -2422,7 +2422,42 @@
2422 @ <tr><td>
2423 @ <input type='hidden' name='namelist' value='%h(blob_str(&namelist))'>
2424 @ <input type='submit' name='submit' value="Apply Changes">
2425 @ </td><td></td></tr>
2426 @ </table></form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2427 style_footer();
2428 }
2429
--- src/setup.c
+++ src/setup.c
@@ -2422,7 +2422,42 @@
2422 @ <tr><td>
2423 @ <input type='hidden' name='namelist' value='%h(blob_str(&namelist))'>
2424 @ <input type='submit' name='submit' value="Apply Changes">
2425 @ </td><td></td></tr>
2426 @ </table></form>
2427 @ <hr>
2428 @ <p>When the first term of an incoming URL exactly matches one of the "Aliases" on
2429 @ the left-hand side (LHS) above, the URL is converted into the corresponding form
2430 @ on the right-hand side (RHS).
2431 @ <ul>
2432 @ <li><p>
2433 @ The LHS is compared against only the first term of the incoming URL.
2434 @ All LHS entries in the alias table should therefore begin with a
2435 @ single "/" followed by a single path element.
2436 @ <li><p>
2437 @ The RHS entries in the alias table should begin with a single "/" followed by
2438 @ a path element, and optionally followed by "?" and a list of query parameters.
2439 @ <li><p>
2440 @ Query parameters on the RHS are added to the set of query parameters
2441 @ in the incoming URL.
2442 @ <li><p>
2443 @ If the same query parameter appears in both the incoming URL and on the RHS of the
2444 @ alias, the RHS query parameter value overwrites the value on the incoming URL.
2445 @ <li><p>
2446 @ If a query parameter on the RHS of the alias is of the form "X!" (a name followed
2447 @ by "!") then the X query parameter is removed from the incoming URL if it exists.
2448 @ <li><p>
2449 @ Only a single alias operation occurs. It is not possible to nest aliases.
2450 @ The RHS entries must be built-in webpage names.
2451 @ <li><p>
2452 @ The alias table is only checked if no built-in webpage matches the incoming URL.
2453 @ Hence, it is not possible to override a built-in webpage using aliases. This is
2454 @ by design.
2455 @ </ul>
2456 @
2457 @ <p>To delete an entry from the alias table, changes its name or value to an
2458 @ empty string and press "Apply Changes".
2459 @
2460 @ <p>To add a new alias, fill in the name and value in the bottom row of the table
2461 @ above and press "Apply Changes".
2462 style_footer();
2463 }
2464

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button