Skip to content

Instantly share code, notes, and snippets.

@paimoe
Created August 10, 2011 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paimoe/9ee54b15a3a7627e9f6b to your computer and use it in GitHub Desktop.
Save paimoe/9ee54b15a3a7627e9f6b to your computer and use it in GitHub Desktop.
Canonical Blogger redirects, should imitate a 301 redirect from blogger
<head>
<title><$BlogPageTitle$></title>
<Blogger><ItemPage><link rel="canonical" href="http://www.rugbydump.net/index/reverse_g/?s=<$BlogItemPermalinkURL$>" /></ItemPage></Blogger>
<MainPage><link rel="canonical" href="http://www.rugbydump.net/" /></MainPage>
<Blogger><ArchivePage><link rel="canonical" href="http://www.rugbydump.net/index/reverse_g/?s=/<$BlogItemArchiveFilename$>" /></ArchivePage></Blogger>
<script type="text/javascript">
rd_path = window.location.pathname + window.location.search
rd_next_path = 'http://www.rugbydump.net/index/reverse' + rd_path;
<Blogger><ItemPage>window.location.href = rd_next_path</ItemPage></Blogger>
<MainOrArchivePage>window.location.href = rd_next_path</MainOrArchivePage>
</script>
@jalamono
Copy link

Where should I put the code???
What words must I change???

Thanks!!!!

@kingfreedy
Copy link

kingfreedy commented Jun 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment