Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自定义不同域名 #2

Open
cgkings opened this issue Dec 4, 2021 · 2 comments
Open

自定义不同域名 #2

cgkings opened this issue Dec 4, 2021 · 2 comments

Comments

@cgkings
Copy link

cgkings commented Dec 4, 2021

如果我现在有域名 myurl.com
如何实现 访问myurl.com为短连接主页,生成短连接格式 myurl.com/abcdef

@cgkings
Copy link
Author

cgkings commented Dec 4, 2021

我查源代码的问题集,倒是解决了访问的问题,但是能访问myurl.com,转出来的短链接myurl.com/abcdef无法访问原地址,而是重定向到了https://dns.google/abcdef,然后提示google 404错误,具体信息如下:
“404. 那是一个错误。
/abcdef 在此服务器上找不到请求的 URL 。 我们知道的就这些。”

另外,贴一下访问是怎么解决的:
把myurl.com加入cf,然后添加一个A记录,名称就是@,ip地址随意(比如8.8.8.8),启用代理(小云朵点亮);然后在worker里的http routes里将myurl.com引用到本项目的cf worker空间

@crazypeace
Copy link

crazypeace commented Nov 15, 2022

你试试这个?
使用秘密路径访问操作页面。支持自定义短链。API 不公开服务。页面缓存设置过的短链。长链接文本框预搜索localStorage。增加删除某条短链的按钮。

演示页面
https://1ladder.eu.org/tiananmen

GitHub https://github.com/crazypeace/Url-Shorten-Worker/

搭建教程
https://zelikk.blogspot.com/2022/07/url-shorten-worker-hide-tutorial.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants