代码拉取完成,页面将自动刷新
本程序是一款简单的短链接生成系统,极其方便部署。
php -S 127.0.0.1:12138
location / {
try_files $uri $uri/ /index.php?$query_string;
}
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/?$1 [L]
比如,/shorturl/
以 /
结尾,实际访问 http://ip/shorturl/
define('SUB_PATH', '/shorturl/');
同样,这里 Nginx 要做配置
location /shorturl {
try_files $uri $uri/ /shorturl/index.php?$query_string;
}
这里 Apache 要做配置
RewriteRule ^(.*)$ /shorturl/index.php/?$1 [L]
curl -s http://127.0.0.1:12138/api/link?url=https://uinote.com/article-430.html
Response
{"msg":"ok","code":200,"data":"http://127.0.0.1:12138/s/aFdlm"}
this project's initial version is forked from https://github.com/ellermister/shorturl, thanks to ellermister !
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。