【问题标题】:Display subfolder as main folder将子文件夹显示为主文件夹
【发布时间】:2013-10-14 20:18:56
【问题描述】:

我的主目录包含:

  1. 约翰(文件夹)
  2. 简(文件夹)
  3. james(文件夹)
  4. config.php
  5. index.php

我想将它们重组为:

  1. 用户(文件夹)
  2. config.php
  3. index.php

“用户”文件夹包含在哪里:

  1. 约翰(文件夹)
  2. 简(文件夹)
  3. james(文件夹)

但将约翰的网址保留为 www.mydomain.com/john 而不是 www.mydomain.com/user/john

【问题讨论】:

  • 请分享您到目前为止所做的事情。这可以通过 .htaccess 来完成。

标签: php directory mkdir subdirectory


【解决方案1】:

您目前使用哪个网络服务器。

如果 Apache => 使用重写 URL http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-05-06
    • 2013-07-09
    • 1970-01-01
    • 2021-10-07
    • 2017-10-08
    • 2015-09-20
    • 1970-01-01
    相关资源
    最近更新 更多