@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix content: <http://purl.org/rss/1.0/modules/content/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<https://lhero.org/portfolio/lh-url-redirects/>
  a sioc:Post ;
  dc:title "Abilities" ;
  dcterms:identifier 152498 ;
  dc:modified "2026-10-25T18:35:43Z"^^xsd:dateTime ;
  dc:created "2026-10-25T18:35:43Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-url-redirects/abilities/> ;
  sioc:has_creator <https://lhero.org/author/1/#account> ;
  sioc:has_container <https://lhero.org/#posts> ;
  content:encoded "<ul class=\"lh_portfolio-meta\"><li><strong>Part of:</strong> <a href=\"https://lhero.org/portfolio/lh-url-redirects/\">LH URL Redirects</a></li></ul><div class=\"lh_portfolio-ability-reference\"><ul class=\"lh_portfolio-ability-reference-index\"><li><a href=\"#ability-create-redirect\"><code>create-redirect</code></a> Create Redirect</li><li><a href=\"#ability-delete-redirect\"><code>delete-redirect</code></a> Delete Redirect</li><li><a href=\"#ability-get-redirect\"><code>get-redirect</code></a> Get Redirect</li><li><a href=\"#ability-import-legacy-redirects\"><code>import-legacy-redirects</code></a> Import Legacy Redirects</li><li><a href=\"#ability-list-redirects\"><code>list-redirects</code></a> List Redirects</li><li><a href=\"#ability-resolve-url\"><code>resolve-url</code></a> Resolve URL</li><li><a href=\"#ability-update-redirect\"><code>update-redirect</code></a> Update Redirect</li></ul><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-create-redirect\"><h2>Create Redirect</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-url-redirects/create-redirect</code></p><p>Creates a network URL redirect or 410 Gone rule for a source URL on any host, mapped to a site or not. Rules apply only when the source would otherwise 404, or to the root of a domain no site is mapped to. Refuses a duplicate source (same match type, host and path) and a target equal to the source. Returns the saved rule. Requires <code>install_plugins</code>; main site only.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>source_url</code></td><td>string</td><td>Yes</td><td></td><td>Absolute URL to match, e.g. https://example.org/old-page/. Only host and path count: scheme, query string and trailing slash are ignored. The host need not belong to any site on the network.</td></tr><tr><td><code>match_type</code></td><td>string</td><td>No</td><td></td><td>exact (default) matches the path only; prefix matches the path and everything below it, and the path &quot;/&quot; matches the whole host. The longest prefix wins, and an exact rule beats any prefix. One of: <code>exact</code>, <code>prefix</code>.</td></tr><tr><td><code>status_code</code></td><td>integer</td><td>No</td><td></td><td>Response code. Default 301. 410 sends Gone and ignores <code>target_url</code>. One of: <code>301</code>, <code>302</code>, <code>303</code>, <code>307</code>, <code>308</code>, <code>410</code>.</td></tr><tr><td><code>target_url</code></td><td>string</td><td>No</td><td></td><td>Absolute http(s) URL to redirect to, on any domain. Required unless <code>status_code</code> is 410.</td></tr><tr><td><code>note</code></td><td>string</td><td>No</td><td></td><td>Optional note on why the rule exists.</td></tr><tr><td><code>task_id</code></td><td>integer</td><td>No</td><td></td><td>Optional. The lh-tasks task this call is working on. Pass with <code>claim_token</code>: the call is refused unless you hold that claim, and a successful call renews it.</td></tr><tr><td><code>claim_token</code></td><td>string</td><td>No</td><td></td><td>Optional. The <code>claim_token</code> from claim-next-task for <code>task_id</code>. Required when <code>task_id</code> is given.</td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-delete-redirect\"><h2>Delete Redirect</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-url-redirects/delete-redirect</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-destructive\">Destructive</span> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Permanently deletes a network URL redirect or 410 rule by id, so its source 404s again. Returns the deleted rule so it can be recreated with create-redirect if needed. Requires <code>install_plugins</code>; main site only.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td>integer</td><td>Yes</td><td></td><td></td></tr><tr><td><code>task_id</code></td><td>integer</td><td>No</td><td></td><td>Optional. The lh-tasks task this call is working on. Pass with <code>claim_token</code>: the call is refused unless you hold that claim, and a successful call renews it.</td></tr><tr><td><code>claim_token</code></td><td>string</td><td>No</td><td></td><td>Optional. The <code>claim_token</code> from claim-next-task for <code>task_id</code>. Required when <code>task_id</code> is given.</td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-get-redirect\"><h2>Get Redirect</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-url-redirects/get-redirect</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-readonly\">Read-only</span> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Gets one network URL redirect or 410 rule by its id, with its hit count and last hit. Use list-redirects to find ids, or resolve-url to find the rule a URL would hit. Requires <code>install_plugins</code>; main site only.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td>integer</td><td>Yes</td><td></td><td></td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-import-legacy-redirects\"><h2>Import Legacy Redirects</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-url-redirects/import-legacy-redirects</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Imports the published rules of the retired lh-response-handler plugin into the network redirect table. Dry run by default: reports what each Response post would become without writing. Safe to rerun, since posts already imported are skipped by their legacy id, as are sources that duplicate an existing rule. The old posts are left untouched. Requires <code>install_plugins</code>; main site only.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>dry_run</code></td><td>boolean</td><td>No</td><td><code>true</code></td><td>true (default) only reports; false writes the rules.</td></tr><tr><td><code>task_id</code></td><td>integer</td><td>No</td><td></td><td>Optional. The lh-tasks task this call is working on. Pass with <code>claim_token</code>: the call is refused unless you hold that claim, and a successful call renews it.</td></tr><tr><td><code>claim_token</code></td><td>string</td><td>No</td><td></td><td>Optional. The <code>claim_token</code> from claim-next-task for <code>task_id</code>. Required when <code>task_id</code> is given.</td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-list-redirects\"><h2>List Redirects</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-url-redirects/list-redirects</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-readonly\">Read-only</span> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Lists network URL redirect and 410 rules, filtered by host, site, status code or text. Returns rules sorted by host then path, with hit counts, plus the total matching. search matches path, target or note. <code>site_id</code> 0 lists rules for domains no site is mapped to. Pages with limit (max 500) and offset. Requires <code>install_plugins</code>; main site only.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>host</code></td><td>string</td><td>No</td><td></td><td>Only rules for this host, e.g. princesparktouch.com.</td></tr><tr><td><code>site_id</code></td><td>integer</td><td>No</td><td></td><td>Only rules whose source belongs to this network site; 0 for unmapped domains.</td></tr><tr><td><code>status_code</code></td><td>integer</td><td>No</td><td></td><td>Only rules with this response code.</td></tr><tr><td><code>search</code></td><td>string</td><td>No</td><td></td><td>Text to find in the source path, target URL or note.</td></tr><tr><td><code>limit</code></td><td>integer</td><td>No</td><td><code>100</code></td><td></td></tr><tr><td><code>offset</code></td><td>integer</td><td>No</td><td><code>0</code></td><td></td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-resolve-url\"><h2>Resolve URL</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-url-redirects/resolve-url</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-readonly\">Read-only</span> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Shows which network redirect rule, if any, a URL would hit, without counting a hit. Applies the same matching as live requests: exact path first, then the longest prefix on that host. A rule only fires live when the URL would otherwise 404, which this does not check. Requires <code>install_plugins</code>; main site only.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>url</code></td><td>string</td><td>Yes</td><td></td><td>Absolute URL to test.</td></tr></tbody></table></figure></section><section class=\"lh_portfolio-ability-reference-ability\" id=\"ability-update-redirect\"><h2>Update Redirect</h2><p class=\"lh_portfolio-ability-reference-meta\"><code>lh-url-redirects/update-redirect</code> <span class=\"lh_portfolio-ability-reference-annotation lh_portfolio-ability-reference-annotation-idempotent\">Idempotent</span></p><p>Changes an existing network URL redirect or 410 rule by id; fields left out keep their values. Hit counts are kept. Refuses a change that would duplicate another rule&#039;s source. Returns the updated rule. Requires <code>install_plugins</code>; main site only.</p><figure class=\"wp-block-table lh_portfolio-ability-reference-params\"><table><thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td>integer</td><td>Yes</td><td></td><td></td></tr><tr><td><code>source_url</code></td><td>string</td><td>No</td><td></td><td>Absolute URL to match, e.g. https://example.org/old-page/. Only host and path count: scheme, query string and trailing slash are ignored. The host need not belong to any site on the network.</td></tr><tr><td><code>match_type</code></td><td>string</td><td>No</td><td></td><td>exact (default) matches the path only; prefix matches the path and everything below it, and the path &quot;/&quot; matches the whole host. The longest prefix wins, and an exact rule beats any prefix. One of: <code>exact</code>, <code>prefix</code>.</td></tr><tr><td><code>status_code</code></td><td>integer</td><td>No</td><td></td><td>Response code. Default 301. 410 sends Gone and ignores <code>target_url</code>. One of: <code>301</code>, <code>302</code>, <code>303</code>, <code>307</code>, <code>308</code>, <code>410</code>.</td></tr><tr><td><code>target_url</code></td><td>string</td><td>No</td><td></td><td>Absolute http(s) URL to redirect to, on any domain. Required unless <code>status_code</code> is 410.</td></tr><tr><td><code>note</code></td><td>string</td><td>No</td><td></td><td>Optional note on why the rule exists.</td></tr><tr><td><code>task_id</code></td><td>integer</td><td>No</td><td></td><td>Optional. The lh-tasks task this call is working on. Pass with <code>claim_token</code>: the call is refused unless you hold that claim, and a successful call renews it.</td></tr><tr><td><code>claim_token</code></td><td>string</td><td>No</td><td></td><td>Optional. The <code>claim_token</code> from claim-next-task for <code>task_id</code>. Required when <code>task_id</code> is given.</td></tr></tbody></table></figure></section></div>"^^rdf:XMLLiteral ;
  sioc:content "Part of: LH URL Redirectscreate-redirect Create Redirectdelete-redirect Delete Redirectget-redirect Get Redirectimport-legacy-redirects Import Legacy Redirectslist-redirects List Redirectsresolve-url Resolve URLupdate-redirect Update RedirectCreate Redirectlh-url-redirects/create-redirectCreates a network URL redirect or 410 Gone rule for a source URL on any host, mapped to a site or not. Rules apply only when the source would otherwise 404, or to the root of a domain no site is mapped to. Refuses a duplicate source (same match type, host and path) and a target equal to the source. Returns the saved rule. Requires install_plugins; main site only.ParameterTypeRequiredDefaultDescriptionsource_urlstringYesAbsolute URL to match, e.g. https://example.org/old-page/. Only host and path count: scheme, query string and trailing slash are ignored. The host need not belong to any site on the network.match_typestringNoexact (default) matches the path only; prefix matches the path and everything below it, and the path &quot;/&quot; matches the whole host. The longest prefix wins, and an exact rule beats any prefix. One of: exact, prefix.status_codeintegerNoResponse code. Default 301. 410 sends Gone and ignores target_url. One of: 301, 302, 303, 307, 308, 410.target_urlstringNoAbsolute http(s) URL to redirect to, on any domain. Required unless status_code is 410.notestringNoOptional note on why the rule exists.task_idintegerNoOptional. The lh-tasks task this call is working on. Pass with claim_token: the call is refused unless you hold that claim, and a successful call renews it.claim_tokenstringNoOptional. The claim_token from claim-next-task for task_id. Required when task_id is given.Delete Redirectlh-url-redirects/delete-redirect Destructive IdempotentPermanently deletes a network URL redirect or 410 rule by id, so its source 404s again. Returns the deleted rule so it can be recreated with create-redirect if needed. Requires install_plugins; main site only.ParameterTypeRequiredDefaultDescriptionidintegerYestask_idintegerNoOptional. The lh-tasks task this call is working on. Pass with claim_token: the call is refused unless you hold that claim, and a successful call renews it.claim_tokenstringNoOptional. The claim_token from claim-next-task for task_id. Required when task_id is given.Get Redirectlh-url-redirects/get-redirect Read-only IdempotentGets one network URL redirect or 410 rule by its id, with its hit count and last hit. Use list-redirects to find ids, or resolve-url to find the rule a URL would hit. Requires install_plugins; main site only.ParameterTypeRequiredDefaultDescriptionidintegerYesImport Legacy Redirectslh-url-redirects/import-legacy-redirects IdempotentImports the published rules of the retired lh-response-handler plugin into the network redirect table. Dry run by default: reports what each Response post would become without writing. Safe to rerun, since posts already imported are skipped by their legacy id, as are sources that duplicate an existing rule. The old posts are left untouched. Requires install_plugins; main site only.ParameterTypeRequiredDefaultDescriptiondry_runbooleanNotruetrue (default) only reports; false writes the rules.task_idintegerNoOptional. The lh-tasks task this call is working on. Pass with claim_token: the call is refused unless you hold that claim, and a successful call renews it.claim_tokenstringNoOptional. The claim_token from claim-next-task for task_id. Required when task_id is given.List Redirectslh-url-redirects/list-redirects Read-only IdempotentLists network URL redirect and 410 rules, filtered by host, site, status code or text. Returns rules sorted by host then path, with hit counts, plus the total matching. search matches path, target or note. site_id 0 lists rules for domains no site is mapped to. Pages with limit (max 500) and offset. Requires install_plugins; main site only.ParameterTypeRequiredDefaultDescriptionhoststringNoOnly rules for this host, e.g. princesparktouch.com.site_idintegerNoOnly rules whose source belongs to this network site; 0 for unmapped domains.status_codeintegerNoOnly rules with this response code.searchstringNoText to find in the source path, target URL or note.limitintegerNo100offsetintegerNo0Resolve URLlh-url-redirects/resolve-url Read-only IdempotentShows which network redirect rule, if any, a URL would hit, without counting a hit. Applies the same matching as live requests: exact path first, then the longest prefix on that host. A rule only fires live when the URL would otherwise 404, which this does not check. Requires install_plugins; main site only.ParameterTypeRequiredDefaultDescriptionurlstringYesAbsolute URL to test.Update Redirectlh-url-redirects/update-redirect IdempotentChanges an existing network URL redirect or 410 rule by id; fields left out keep their values. Hit counts are kept. Refuses a change that would duplicate another rule&#039;s source. Returns the updated rule. Requires install_plugins; main site only.ParameterTypeRequiredDefaultDescriptionidintegerYessource_urlstringNoAbsolute URL to match, e.g. https://example.org/old-page/. Only host and path count: scheme, query string and trailing slash are ignored. The host need not belong to any site on the network.match_typestringNoexact (default) matches the path only; prefix matches the path and everything below it, and the path &quot;/&quot; matches the whole host. The longest prefix wins, and an exact rule beats any prefix. One of: exact, prefix.status_codeintegerNoResponse code. Default 301. 410 sends Gone and ignores target_url. One of: 301, 302, 303, 307, 308, 410.target_urlstringNoAbsolute http(s) URL to redirect to, on any domain. Required unless status_code is 410.notestringNoOptional note on why the rule exists.task_idintegerNoOptional. The lh-tasks task this call is working on. Pass with claim_token: the call is refused unless you hold that claim, and a successful call renews it.claim_tokenstringNoOptional. The claim_token from claim-next-task for task_id. Required when task_id is given." ;
  sioc:topic <https://lhero.org/?taxonomy=author&term=cap-1> .

<https://lhero.org/author/1/#account> rdfs:seeAlso <https://lhero.org/author/1/?feed=lhrdf&format=turtle> .
<https://lhero.org/?taxonomy=author&term=cap-1> rdfs:seeAlso <https://lhero.org/?taxonomy=author&term=cap-1&feed=lhrdf&format=turtle> .
