mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-03-26 22:16:28 +08:00
访问未绑定的域名跳到 RP 主页
This commit is contained in:
@@ -32,10 +32,15 @@
|
||||
rm /etc/nginx/sites-enabled/default
|
||||
|
||||
cat > /etc/nginx/sites-available/rpadmin
|
||||
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server ipv6only=on;
|
||||
rewrite ^/(.*)$ http://DOMAIN/#redirect permanent;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
server_name DOMAIN;
|
||||
|
||||
|
||||
@@ -6,6 +6,9 @@ $ ->
|
||||
if $(@).attr('href') == location.pathname
|
||||
$(@).parent().addClass('active')
|
||||
|
||||
if window.location.hash == '#redirect'
|
||||
$('#site-not-exist').modal 'show'
|
||||
|
||||
$('#logout').click (e) ->
|
||||
e.preventDefault()
|
||||
$.post '/account/logout/', {}
|
||||
|
||||
@@ -66,3 +66,15 @@ block content
|
||||
| by
|
||||
a(href= 'http://jysperm.me') jysperm
|
||||
| , yudong
|
||||
|
||||
#site-not-exist.modal
|
||||
.modal-dialog
|
||||
.modal-content
|
||||
.modal-header
|
||||
button.close(type='button', data-dismiss='modal', aria-hidden='true') ×
|
||||
h4.modal-title 您访问的站点不存在
|
||||
.modal-body
|
||||
p 因为您要访问的站点不存在,所以我们将页面重定向到了 RP 主机首页。
|
||||
p 很可能是由于这个站点的所有者删除或修改了这个站点。
|
||||
.modal-footer
|
||||
button.btn.btn-danger(type='button', data-dismiss='modal') 关闭
|
||||
|
||||
Reference in New Issue
Block a user