Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Canonical Blogger redirects, should imitate a 301 redirect from blogger
<Blogger><ItemPage><link rel="canonical" href="<$BlogItemPermalinkURL$>" /></ItemPage></Blogger>
<MainPage><link rel="canonical" href="" /></MainPage>
<Blogger><ArchivePage><link rel="canonical" href="<$BlogItemArchiveFilename$>" /></ArchivePage></Blogger>
<script type="text/javascript">
rd_path = window.location.pathname +
rd_next_path = '' + rd_path;
<Blogger><ItemPage>window.location.href = rd_next_path</ItemPage></Blogger>
<MainOrArchivePage>window.location.href = rd_next_path</MainOrArchivePage>

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


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