請問一下,以下2者的網址,為何沒有 teach.html 或 teach.php
等等的頁面,卻是以teach,student做為頁面呢?
這是怎麼做的叱?
http://www.iciba.com/teach
http://www.iciba.com/student

解决方案 »

  1.   

    设置服务器对无扩展名文件的处理方式,或者把地址重写到一个有扩展名的文件
    按他这个具体情况来说,一般是通过urlrewrite来实现的
      

  2.   

    如果是用C/C++写的cgi,编译成啥都行
    demo,demo.aspx,demo.asp,demo.php,demo.jsp,demo.pl,demo.cgi
    还有就是urlrewrite
      

  3.   

    还有一种可能就是使用了MVC架构编写的程序,teach和student分别是两个Controller,每个Controller都会有个默认的入口地址(一般是index)http://www.iciba.com/teach 
    http://www.iciba.com/student

    http://www.iciba.com/teach /index
    http://www.iciba.com/student/index
    是等价的。
      

  4.   

    這個網站是英文單字的查詢,每一單字 就一個網址
    若有一萬個字 ,就要等價一萬個index似乎有點困難。       
                                   壓克力  
      

  5.   

    比如说处理这个的程序叫dict.php
    把teach重写成dict.php?word=teach就能实现了
      

  6.   

    其实就是一个urlrewrite 和楼上说的一样
    其真实地址为http://www.iciba.com/index.php?s=study
      

  7.   

    会不会做的是一个判断呢?比如http://www.iciba.com/teach,获取teach,进行判断,然后跳转到相应页面!