• I have tried searching for the answer to this in Google and here 600 ways and am not finding my exact situation and I don’t have much experience with 301 redirect.

    Details, bullet-pointed:
    –I have a site installed at https://www.mysite.com.
    –I have built a new redesign of this site in a subdirectory of https://www.mysite.com.
    –The old site was accessible at https://www.mysite.com. The new site will be accessed through a new domain name, https://www.mynewsite.com.
    –The site was long established and I don’t want to lose SEO benefits of the old site, and, there are likely links out there to posts on the old site.

    How do I do an .htaccess 301 redirect of ALL pages of the old site (not just home URL to new home URL)? I did find a way using RedirectMatch, however, since the old site is the ROOT site, I cannot specify a directory, and I get an infinite loop error.

    I hope that was enough detail, any help GREATLY appreciated.

    Kym

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter the_webscaper

    (@the_webscaper)

    While waiting for a reply, I did more Googling. I found the following suggestion, which I tried, and it worked.

    RewriteEngine on
    RewriteRule ^(.*)$ https://www.newdomain.com/$1 [R=301,L]

    I don’t know why my first attempts were causing the infinite loop. I’ve now read about a zillion pages in trying to research this so I don’t even recall what lines of code I put in that caused it.

    I hope this will retain the SEO from the old site, if anyone has any cautions, do let me know.

    Hope this will help someone else in the future.

    This isn’t about redirects, but wondered if you ever solved (beg your pardon, but 3 years ago) regarding nextgen captions;

    Your question; “Finally got the caption template to work but the captions are not displaying correctly. In IE, the caption is displaying to the right of the thumbnail, not below it; in FireFox, the caption is BEHIND the photo, so you can’t see it at all.”…

    I have the same problem, captions beside thumbs in IE only.

    https://www.dondean.com/linda-coale/wordpress/linda-coale-giclees/

    thanks, DonDean

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to 301 redirect all pages of root site to a new subdirectory’ is closed to new replies.