5 <meta name=
"viewport" content=
"width=device-width, initial-scale=1" />
7 <link rel=
"stylesheet" href=
"../style.css#" type=
"text/css" />
8 <title>Any url as website
</title>
9 <script type=
"text/javascript">
11 let href
= location
.href
;
12 for(let i
=href
.length
-1;i
>0;i
--){
13 if('/'==href
.charAt(i
) && '/'==href
.charAt(i
-3))
20 location
.href
= location
.href
.substring(0,i
+1)+page
;
22 function nav2Lang(lang
){
24 let href
= location
.href
;
25 location
.href
= location
.href
.substring(0,i
-2)+lang
+location
.href
.substring(i
);
30 <header class='header'
>
31 <a class=
"logo" href=
"javascript:void(0)" onclick=
"return nav2('index.html#')">Home
</a> <a class=
"logo" href=
"javascript:void(0)" onclick=
"return nav2('tags/index.html#')">Tags
</a>
38 <div class=
"container">
39 <h1 class=
"title">Any url as website
41 <span class=
"subtitle"></span>
46 <p>The
<a href=
"../index.html#">uweb
</a> internal link
"<a href=
"../links/index.html">i:
0m
</a>" make any url such as download or indirect links visitable as a website. The second part of
<a href=
"../mirrors/index.html#">mirrors
</a> has examples using the following tricks:
</p>
48 <li>"i:
0m04:[url]
": to treat the [url] content as html with bookmarklet.
</li>
49 <li>"i:
0m?:[url]
": to treat the [url] content as html, handling css/js properly.
</li>
50 <li>"i:
0m?[postfix]:[url]
": auto append query postfix to url to retrieve content.
</li>
51 <li>"i:
0mi:
5h:[url]
": similar to
"i:
0m?:[url]
", to treat the [url] content as html (for download or no-script links etc.)
</li>
52 <li>"i:
0mi:
5h?[postfix]::[url]
": similar to
"i:
0m?[postfix]:[url]
". auto append query postfix to url to retrieve content.
</li>
53 <li>"i:
0mi:
5h/[regex]/[replacement]::[url]
": use the result of regular expression replacement to retrieve the content.
</li>
55 <p>For more complicated links such as cloud storage shared links, which need user gestures to reach temporary generated content link, use
<br>
56 "i:
0m/.../[local.html]:[url]
", where the local file
"/.../[local.html]
" processes
"[url]
" as needed.
</p>
59 <p>Last Modified:
7 April
2024<br>
60 more details on global redirection url
<br>
65 src='https://giscus.app/client.js'
66 data-repo=
"torappinfo/uweb"
67 data-repo-id=
"MDEwOlJlcG9zaXRvcnkzMDIyMDU3MjE="
68 data-category=
"Announcements"
69 data-category-id=
"DIC_kwDOEgNLGc4CQjsh"
72 data-reactions-enabled=
"1"
73 data-emit-metadata=
"0"
74 data-input-position=
"top"
78 crossorigin=
"anonymous" async
>
81 <footer class=
"site-footer">
82 <div class=
"container">
83 © 2018-
2024 Richard H. Cao
86 <!-- This document is licensed under the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is available at <https://www.gnu.org/licenses/>. -->