【问题标题】:Apache Mod RewriteApache Mod 重写
【发布时间】:2011-01-02 11:42:20
【问题描述】:

在我的 Apache 配置中,我有以下语句:

RewriteRule ^/classic(.*) /$1 [nc,l]

这会将所有语句返回到 http://localhost/classic 基本 htdoc 文件夹(因此使用 index.html)

我希望能够输入 http://localhost/classic/somefolder 并使其进入 htdocs 中的特定文件夹。

我该怎么做呢?

【问题讨论】:

    标签: apache configuration mod-rewrite


    【解决方案1】:
    RewriteRule ^/classic/somefolder/(.*)$ /elsewhere/$1 [NC,L]
    RewriteRule ^/classic/(.*)$ /$1 [NC,L]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-08
      • 2012-09-09
      • 2012-06-14
      • 1970-01-01
      相关资源
      最近更新 更多