【问题标题】:.htaccess redirect every request to index.htaccess 将每个请求重定向到索引
【发布时间】:2016-03-05 19:03:29
【问题描述】:

我正在尝试将每个请求重定向到我的目录、其子目录或其文件到 index.php,但我无法这样做。

这是我的网址 http://www.hypovps.in/images/internal-notes-files/26422supportsmallbiz.jpg

我已将 .htaccess 放入图像中。

我想重定向来自的每个请求

http://www.hypovps.in/images
http://www.hypovps.in/images/internal-notes-files
http://www.hypovps.in/images/internal-notes-files/26422supportsmallbiz.jpg

或 /images/ 中的任何其他子目录/文件到 index.php

任何帮助将不胜感激

谢谢

【问题讨论】:

    标签: php apache .htaccess server


    【解决方案1】:

    您可以使用 RedirectMatch 将 /images* 重定向到 /index.php

    RedirectMatch ^/images/.+$ /index.php
    

    【讨论】:

      猜你喜欢
      • 2012-08-16
      • 1970-01-01
      • 1970-01-01
      • 2015-02-02
      • 2011-01-01
      • 1970-01-01
      • 2012-02-18
      • 2016-11-30
      • 2012-11-16
      相关资源
      最近更新 更多