drtj40036 2013-08-03 17:19
浏览 46
已采纳

如何为所有浏览器兼容的iis(未找到服务器)创建默认网页

as you know we have a default web site for iis (windows server 2008 - r2) like below :

iis default web page

when you stop a web site that default web site loads in client's browser instead.
now i want to change that default web site for the purpose below :
please open the site below in all of your browsers(firefox - internet explorer - chrome - etc) :
undefined domain(web site)
for examle in firefox we have server not found page like below :

server not found - in firefox

for IE we have this :

Internet Explorer cannot display the webpage

and etc...
i have a web site in my vps(my site.com) that i stopped it in iis.
when a user opens it i want to show him/her server not page(ff) for example instead of that default iis web site.
i want to create a conditional single web page for that default iis web site that shows server not found page for firefox or Internet Explorer cannot display the webpage page for IE or etc...
as you see i added asp.net with c# and php languages into my tags.
so what is the best way for creating that specific conditional web site and how can i create it?
can i create that web site with html language only(using with jquery or javascript or not)(this is better) or should i use a server-side language like asp.net with c# or php?
i installed php in my own vps (windows server 2008-r2) and there is no problem about that language.

EDIT
my problem is how can i have a conditional single web page?
when a user opens my stopped web site in FF i want to show him/her server not found page for FF, also when a user opens my stopped web site in IE i want to show him/her Internet Explorer cannot display that webpage for IE and etc...

thanks in advance

  • 写回答

1条回答 默认 最新

  • dongxiaofa6359 2013-08-03 17:35
    关注

    If you want to display a specific page when you have taken down your web site then just create another web site (on the same port, i.e. 80) that you start when the first is is stopped. In the second website you have a single page (i.e. Default.html, index.html, etc) which displays the information you want.

    Main Site (Stopped)
    Temporary Site (Started)
    

    When you then start your main site again you just stop the temporary site.

    Edit

    If you stop ALL websites then the browser will not find anything and will display the server not found message specific to the browser. All you need to do is make sure all websites are stopped.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 安装svn网络有问题怎么办
  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥15 latex怎么处理论文引理引用参考文献