Php .htaccess从文件夹重定向

Php .htaccess从文件夹重定向,php,apache,.htaccess,Php,Apache,.htaccess,我正在执行一项任务,需要将所有流向特定文件夹的流量重定向回根目录: Redirect /ridestream_start/ /index.php #effectively, ridestream_start was our beta folder, #and we're moving our functionality to the root folder 为“ridestream\u start”中的每个文件和文件夹编写重定向代码不是很有效,因为它们有很多…我如何仅使用文件夹名称编写重定向

我正在执行一项任务,需要将所有流向特定文件夹的流量重定向回根目录:

Redirect /ridestream_start/ /index.php
#effectively, ridestream_start was our beta folder, 
#and we're moving our functionality to the root folder

为“ridestream\u start”中的每个文件和文件夹编写重定向代码不是很有效,因为它们有很多…我如何仅使用文件夹名称编写重定向代码?

如果我正确理解您的要求,我认为以下方法可以行得通

RewriteEngine on
RewriteBase /
RewriteRule ^ridestream_start/ /index.php

你能用这样的东西吗:

RewriteEngine On
RewriteRule ^/ridestream_start/.* /index.php.com[L,R=301]

漂亮…此链接建立在以下基础上:(发布后约3秒找到解决方案)