折腾:
【未解决】把特定的gitbook发布后时不保存到book.crifan.com上
期间,需要去实现,打开一个html页面,比如index.html,自动跳转到别处
即自动重定向
目前是:
显示404找不到

html auto redirect
<head> <meta http-equiv='refresh' content='0; URL=http://example.com/'> </head>
去试试
<html> <head> <meta http-equiv='refresh' content='0; URL=https://crifan.github.io/scientific_network_summary/website/'> </head> </html>
去上传上去:
[xx@x scientific_network_summary]# rz rz waiting to receive. Starting zmodem transfer. Press Ctrl+C to cancel. Transferring index.html... Transferring index.html, errors 3... 100% 143 bytes 143 bytes/sec 00:00:01 6 Errors [x@x scientific_network_summary]# ll total 4 -rw-r--r-- 1 root root 143 Jul 22 22:47 index.html [root@crifan scientific_network_summary]# cat index.html <html> <head> <meta http-equiv='refresh' content='0; URL=https://crifan.github.io/scientific_network_summary/website/'> </head>
结果:
无法自动跳转。。。
输入:
更不对。
搞错了,是要加到 website子目录。。。
去改为:
[xx@crifan scientific_network_summary]# mkdir website [x@crifan scientific_network_summary]# mv index.html website/ [x@crifan scientific_network_summary]# ll total 4 drwxr-xr-x 2 root root 4096 Jul 22 22:51 website [x@crifan scientific_network_summary]# cd website/ [x@crifan website]# ll total 4 -rw-r--r-- 1 root root 143 Jul 22 22:47 index.html
结果:

-》
可以自动跳转:

如此,即可。
【总结】
此处是给:
下面放了个:
index.html
<html> <head> <meta http-equiv='refresh' content='0; URL=https://crifan.github.io/scientific_network_summary/website/'> </head> </html>
就可以实现:
当打开:
自动跳转到:
了。
转载请注明:在路上 » 【已解决】如何实现html页面打开后自动重定向到别处