I’m slightly fuzzy on what precisely you need (feel free to clarify), but if you’ve moved your entire site to a new directory, you may wish to set a rewrite rule in the .htaccess
file via FTP. There will probably already be a .htaccess
file in the root directory.
The following steps will redirect any URL beginning with sarahhart.ca/boutique
to the equivalent URL beginning with sarahhart.ca/blog
. (Again, if this isn’t what you are looking for, feel free to say.)
Step 1: Insert the following new lines (put them at the start of the file to make sure they take priority):
RewriteEngine on
RewriteRule ^/?boutique/(.*)$ /blog/$1 [R,NC,L]
Just note that browser caching means that you may not see the redirection immediately.
Step 2: Once you have verified that this is working as you intended, change the above lines to this:
RewriteEngine on
RewriteRule ^/?boutique/(.*)$ /blog/$1 [R=301,NC,L]
The additional =301
will instruct browsers and search engines that your content has moved permanently to the new location.
(In principle you can actually skip straight to step 2, but I recommend doing it in two steps, because it can be a pain to undo 301 redirects if you make a mistake or you want to change something.)