Redirect: To

By ErichSteinboeck ErichSteinboeck

Description

Post Redirect info from Feb 2009 asks: “Wikimedia pages that are redirected to, show text "(Redirected from <pagename)", with a link so tht you can see the redirected page. Can the same be done here?”

In action

This page has been redirected from code:redirect-from-2nd

Here is an answer involving:

  • the landing page code:redirect-to (edit it) which shows a “This page has been redirected from …” message only if having been redirected from one of the two redirection pages below
  • a redirection page code:redirect-from (edit it): redirects to “redirect-to” showing an appropriate message there
  • another redirection page code:redirect-from-2nd (edit it): also redirects to “redirect-to” showing an appropriate message there
This is the Redirect module that redirects the browser directly to the "http://snippets.wikidot.com/code:redirect-to/noredirect/true/tag/_(none)/" page.

Code

How the Landing Page is Coded

[[module ListPages category="code" limit="1" tag="@URL"]]
[[size smaller]]
This page has been redirected from [[[%%page_unix_name%%|%%page_unix_name%%]]]
[[/size]]
[[/module]]
[[div style="display : none"]]
[[module Redirect destination="http://snippets.wikidot.com/code:redirect-to/noredirect/true/tag/_(none)/"]]
[[/div]]

How a Redirection Page is Coded

Any redirection page must be uniquely tagged with the tag specified in below [[module Redirect ...]] call — in this case “_code:redirect-from”

[[module Redirect destination="http://snippets.wikidot.com/code:redirect-to/tag/_code:redirect-from/"]]
[[/module]]
[[div style="display : none"]]
[[module Redirect destination="http://snippets.wikidot.com/code:redirect-to/noredirect/true/tag/_(none)/"]]
[[/div]]

Thanks to tsangk for this great snippet: conditional-blocks


text above inserted with:

[[include :snippets:if START |unique=1|type=equal|var1=%%name%%|var2=conditional-blocks]]
**##red|Thanks to tsangk for this great snippet:##** [[[code:conditional-blocks]]]
[[include :snippets:if END]]



Other snippets posted by ErichSteinboeck

TOC's from many pages - 16 Feb 2012 01:47
Module Listpages Tags - 16 Feb 2012 01:24
Module Feed Drilldown: Details Page - 16 Feb 2012 01:24
Module Feed Drilldown - 16 Feb 2012 01:24
Module Feed: Collapsible - 16 Feb 2012 01:23
Module Categories - 16 Feb 2012 01:23
MiniRecentPosts With Limit - 16 Feb 2012 01:23
ListPages: Horizontal? - 16 Feb 2012 01:20
Choose A Page! - 15 Feb 2012 00:32
Redirect: From (1st) - 01 Mar 2009 18:18
Redirect: From (2nd) - 01 Mar 2009 18:17


Rate this solution

If you think this solution is useful — rate it up!

rating: +3
How to undo a redirect?
Luis2Henrique Luis2Henrique 11 May 2009 18:44

So, if I make a wrong redirect, how can I undo that? Is it possible?

by Luis2Henrique Luis2Henrique , 11 May 2009 18:44
Re: How to undo a redirect?
Helmut_pdorf Helmut_pdorf 12 May 2009 08:10

http://community.wikidot.com/help:emergency-help#toc3 !!


Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.

Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?

by Helmut_pdorf Helmut_pdorf , 12 May 2009 08:10
Re: How to undo a redirect?
Luis2Henrique Luis2Henrique 12 May 2009 18:04

Thank you very much, that was really helpful!

by Luis2Henrique Luis2Henrique , 12 May 2009 18:04
First time it is confusing - but after thinking and following your guide- Fine!
Helmut_pdorf Helmut_pdorf 02 Mar 2009 09:57

Thanks Erich for such solution!

First time it is confusing - but after thinking and following your guide- Fine!

I think sometimes - all is possible on wikidot.com .. we need only people like you who think deeper into the procedural tasks happening on the server.


Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.

Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?

by Helmut_pdorf Helmut_pdorf , 02 Mar 2009 09:57
page revision: 7, last edited: 16 Feb 2012 01:37
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License
Click here to edit contents of this page.
Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available.
Append content without editing the whole page source.
Check out how this page has evolved in the past.
If you want to discuss contents of this page - this is the easiest way to do it.
View and manage file attachments for this page.
A few useful tools to manage this Site.
Change the name (also URL address, possibly the category) of the page.
View wiki source for this page without editing.
View/set parent page (used for creating breadcrumbs and structured layout).

AltStyle によって変換されたページ (->オリジナル) /