I’ve ended up with a redirect problem on a site of mine.
site files are contained in a folder on the server: /_site_ccjc/
Domain name directs straight to that folder. Seems simple enough …
BUT, somehow a link or two has gotten out somewhere that has the site folder name in it:
mysite.com/_site_ccjc/about-us instead of mysite.com/about-us
In my htaccess file, if just mysite.com/_site_ccjc/ comes up, I’ve got that redirect working fine in htaccess
So far though, nothing I’ve tried will take care of the “about-us” example above.
Worse, if I test the site with a crawler, it ends up with duplicate addresses for EVERY file, one without “/_site_ccjc” and one with - which is obviously causing search engine problems…
So what I’ve got FIRST in my htaccess file:
DirectoryIndex index.php
RewriteEngine On
RedirectMatch 301^/_site_ccjc/$ https://www.mysite.com/$1
Redirect 301/_site_ccjc/$ https://www.mysite.com/$1
Advice on what I need to change please …