Thread: 301 Redirect
View Single Post
Old 2021-03-10, 11:22 PM   #2
sarettah
Asleep at the switch? I wasn't asleep, I was drunk
 
Join Date: Apr 2005
Posts: 214
Quote:
Originally Posted by Ramster View Post
Trying to redirect everything that comes into a folder, problem is it's often subfolders within it. Any ideas?

.htaccess:
RewriteRule ^/(.*)$ https://domain.com/site/$1 [L,R=301]

Placing it in domain.com/site/scene/ folder so when someone lands on domain.com/site/scene/757/1922/her-video they get redirected to just https://domain.com/site/

Anyone?
If you do not have any additional .htaccess files in the subfolders then that should work I would think. If it encounters another .htaccess along the way that will override, I believe.

I will test for a second and let you know.

Last edited by sarettah; 2021-03-10 at 11:52 PM..
sarettah is offline   Reply With Quote