CRZ.im简洁短网址生成缩短服务网站源码
搭建好Web环境,可以使用宝塔面板,或者LNMP一键包,只需要安装Nginx、PHP即可。
然后解析好域名,上传程序源码到网站根目录,源码Github:https://github.com/anhao/kurl.us/
接下来设置Nginx伪静态,在网站配置文件中添加以下代码:
#root后面为网站根目录
location / { try_files $uri $uri/ =404; rewrite (\\d+|\\w+)$ /index.php?id=$1; location ^~ /asset/ { root /var/www/xx.com; } location ^~ /api/ { root /var/www/xx.com; } location ^~ /inc/ { return 403; } }
最后只需要修改config.php的相关配置并把inc目录权限设置为可读写即可。
CRZ.im是一个网址缩短服务的网站,所用的源码基于PHP、SQLite进行开发,总大小仅10K左右,十分轻巧。
下载地址:
https://www.lanzoux.com/i6a405a
https://pan.baidu.com/s/1KGRVa2_t6q33Yx-Tt7bC4A?pwd=xhvk
THE END