OT : help needed for a Apache 301 redirect using regex

Richard Gaskin ambassador at fourthworld.com
Sat Sep 14 14:36:54 EDT 2013


I had hoped to address that point, but perhaps I'd just misunderstood 
what's needed.

What I was proposing was for requests to be handled in the CGI 
dynamically, so the older format would be translated to the new on 
on-the-fly as requests come in.  If there's no ".php?" in the request 
then the URL would be used as-is, effectively supporting both formats.


A separate potential issue is the duplicate content penalty Google may 
impose if it discovers that the same page can be accessed by two 
different URLs.  But if you add a canonical tag with the new-form URL to 
the head you should be fine; with LC server even that could be added 
on-the-fly as needed.

An extra benefit to a canonical tag (for G at least; I have no idea if 
Bing or Yahoo are as thorough) is that over time G will update its index 
using only the new URL, so eventually you'll be able to remove the 
handling for the old-format URLs from your CGI script without losing any 
SEO value.

Notes from G on canonical:
<https://support.google.com/webmasters/answer/139394>

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  Follow me on Twitter:  http://twitter.com/FourthWorldSys

jbv wrote:
> yes of course, but that's not the point : there are thousands of links
> that have
> already been visited by googlebots and on the site upgrade that is about to
> be put online, all these links will be changed from
>   mydomain.com/foo.php?someName_someCode
> to
>   mydomain.com/?foo_someName_someCode
> and we need to configure .htaccess with a permanent 301 redirect so that
> all links already visited by bots don"t get lost...
>
>>
>> What's handling those URLs on the backend?  LC Server, PHP, or something
>> else?
>>
>> If LC I would imagine you could alter the string following the domain to
>> simply replace ".php?" with "_", no?




More information about the use-livecode mailing list