Forum Moderators: phranque

Message Too Old, No Replies

Want to direct Folder with subfolders to New Domain

redirecting old folder to new domain

         

Om108

6:10 pm on Jun 7, 2005 (gmt 0)

10+ Year Member



I have a primary domain in which I have a "hobby-folder". This "hobby-folder" has grown so large, I decided to create a new domain for it.

So I want to redirect all the links in my "hobby-folder" to my new domain. Since there are over a hundred links and about 10 subfolders (and I don't want to redirect each page and subfolder individually), would the following redirect work:

RedirectMatch permanent ^/hobby-folder/$ [new-domain...]

Will this redirect all the links and subfolders in my hobby folder to my new domain?

Thanks

jdMorgan

2:11 am on Jun 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No, that would drop the requested filename, and redirect everything to your "home page."

Try:


RedirectMatch permanent ^/hobby-folder/?(.*)$ http://www.new-domain/$1

Jim

Om108

6:25 pm on Jun 8, 2005 (gmt 0)

10+ Year Member



jdMorgan. Thank you.

There is a problem though. It does not redirect my subfolders in my main "hobby folder". Instead, I get an error page.

For example, my hobby folder is named "Hobby-Folder". I have about 10 subfolders in this folder. The largest being "Scrabble". When I use that redirect, it only redirects the "Hobby Folder" index page to my new domain, but does not redirect the links or subfolders in that main folder.

Am I missing something? Thanks.

jdMorgan

7:03 pm on Jun 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try flushing your browser cache and re-testing, since this is precisely the effect that you'd expect if the results of your old code were cached locally.

Jim