Forum Moderators: phranque

Message Too Old, No Replies

htaccess redirecting all of folder contents

htaccess redirect entire folder

         

theChronic

12:53 am on May 16, 2006 (gmt 0)

10+ Year Member



Hey whats up
Does anyone know of a way so that if anything in a folder is accessed, it is redirect to the same file name but in a different folder?

Here is the human concept:
redirect 301 /people/cool/*.html http://www.example.com/people/awesome/*.html

Thanks a lot
John

[edited by: jdMorgan at 2:48 am (utc) on May 16, 2006]
[edit reason] example.com [/edit]

Mokita

1:57 am on May 16, 2006 (gmt 0)

10+ Year Member



I am no .htaccess expert but I think you can do it this way:

redirect 301 /people/cool/ http://www.example.com/people/awesome/

Try placing that in your .htaccess file, then test it in your browser by typing in the name of a file which was in "cool", but is now in "awesome" e.g.

http://www.example.com/people/cool/performers.html

theChronic

5:03 am on May 16, 2006 (gmt 0)

10+ Year Member



Genius..thanks so much. That just cut down a few tedious hours.

Thanks
John