.htaccess / Redirect best practices
-
Hi all,
I’m seeking advise on .htaccess best practices. We have an English site that had German translations created for some Posts, and Pages. It’s the German Posts that are to be removed, the German Pages are to remain. Once the posts have been removed, we want to redirect the old URLs to their english counterparts.
There are 57 Posts to be removed in total. I’ve found that Google recommends using server side 301 redirects. So this means editing the .htaccess file. I’m not well versed in RegEx, but found the info I need here .
I understand that, if we were removing all German content, we could use one line of RegEx code to do the job, because the German URLs looks like:
http:www.mydomain.com/page1/?lang=de
and its English counterpart looks like:
http:www.mydomain.com/page1/
So we could use a RegEx command to strip the /?lang=de part, thus redirecting to the correct URL. But, as we’re only removing some of the German content, this isn’t an option.
So my questions are:
Do we have to add a redirection for each of the 57 URLs that are to be removed?
Does having so many redirects cause any side effects in terms of performance?
Can the redirects be removed after a given period of time? I.e once search engine et al have had a chance to register the change?Any insight much appreciated,
colkav2015
- The topic ‘.htaccess / Redirect best practices’ is closed to new replies.