duan7007 2012-06-27 16:03
浏览 120
已采纳

IIS 6重定向目录到index.php?

I developed a PHP web application under Apache and am currently in the process of moving it to a server running IIS 6. Whenever I use this application on an Apache server typing this:

http://mysite.com/subpage/

would internally redirect to:

http://mysite.com/subpage/index.php

Is there a way within IIS 6 to replicate this same behavior? Simply typing a link without index.php give me a director listing denied error. I am not a server administrator, and thus do not have the ability to install an extensions, if they are needed.

Thank you for your time

  • 写回答

3条回答 默认 最新

  • dongqiabei7682 2012-06-27 16:14
    关注

    On IIS 6 (been a while since I used it) I believe you can set the Default Document in either the application pool setting or the application itself.

    In the Default Document properties box, there is a listing of file names and extensions you can set it to load automatically. They are in descending order of priority. You'll want to add index.php to the list and move it to the top.

    This will make it so any time you go to a "bare" directory, like http://www.example.com or http://www.example.com/subpage/ it will load up index.php.

    If you're trying to do it without administrative access, you can add a Default Document section to your web.config file which then gets used. http://www.iis.net/ConfigReference/system.webServer/defaultDocument

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 WPF动态创建页面内容
  • ¥15 如何对TBSS的结果进行统计学的分析已完成置换检验,如何在最终的TBSS输出结果提取除具体值及如何做进一步相关性分析
  • ¥15 SQL数据库操作问题
  • ¥100 关于lm339比较电路出现的问题
  • ¥15 Matlab安装yalmip和cplex功能安装失败
  • ¥15 加装宝马安卓中控改变开机画面
  • ¥15 STK安装问题问问大家,这种情况应该怎么办
  • ¥15 关于罗技鼠标宏lua文件的问题
  • ¥15 halcon ocr mlp 识别问题
  • ¥15 已知曲线满足正余弦函数,根据其峰值,还原出整条曲线