Home  >  Article  >  Backend Development  >  web.config伪静态设置,该如何解决

web.config伪静态设置,该如何解决

WBOY
WBOYOriginal
2016-06-13 10:46:191181browse

web.config伪静态设置
我想把http://www.zx123.cn/gallery/zxfglist/1_1_0改成http://www.zx123.cn/cate/index.php/1_1_0这样子,我在web.config里面是这样写的


 
 

第一个url访问不到数据,手动访问第二个是可以的,但是经过这样的伪静态后不能把第一个转化为第二个,请问是怎么回事呢。我的伪静态写错了吗?求高手指教

------解决方案--------------------
形如 http://www.zx123.cn/gallery/zxfglist/1_1_0 这样的 url,如果 gallery/zxfglist/1_1_0 目录不存在,则一定是报错的
当然你采取了“隐藏文件名”措施之后
http://www.zx123.cn/gallery/zxfglist/1_1_0
会被 文本服务器理解为
http://www.zx123.cn/index.php/gallery/zxfglist/1_1_0

IIS 中如何做到隐藏文件名,就需要你放狗了

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn