Thread: 301 Redirect
View Single Post
Old 03-10-2021, 11:22 PM   #2
sarettah
The only guys who wear Hawaiian shirts are gay guys and big fat party animals
 
Join Date: Apr 2005
Posts: 170
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; 03-10-2021 at 11:52 PM..
sarettah is offline   Reply With Quote