Help:Redirect - Meta .wikimedia .org
文章推薦指數: 80 %
From Meta, a Wikimedia project coordination wiki Help:Redirect FromMeta,aWikimediaprojectcoordinationwiki Jumptonavigation Jumptosearch Thispagecontainschangeswhicharenotmarkedfortranslation.+/- MediaWikiHandbook:Contents,Readers,Editors,Moderators,Systemadmins,Researchers Seealso:Wikipedia:Redirect Aredirectisapagethatautomaticallyredirectsthereader'sbrowsertoaspecifiedtargetpage.Redirectsareusedtohelpuserslocateinformationandkeepwikisorganized,sothatmultiplenames,abbreviations,misspellings,orrelatedtopicscanallpointtothesamepage. Aredirectiscreatedbythetext #REDIRECT[[nameofthetargetpage]] Asanexample,ifthepage "Foo"startswiththeline #REDIRECT[[Bar]],thenthepersonswhovisitthepage "Foo"willbeshownthepage "Bar"withanotethattheywereredirectedfrom"Foo".Thepage "Bar"doesnotneedanythinginittobethetargetoftheredirection. Anytextthereafterisignoredandisrenderedonlyinadiff. Contents 1Appearance 2Help:Redirect 2.1FromMeta,aWikimediaprojectcoordinationwiki 2.2Restrictions 2.3Purposesofaredirect 2.3.1Specialpurposes 2.4Creatingaredirect 2.5Renderingoftheredirectpage 3Help:Redirection 3.1FromMeta,aWikimediaprojectcoordinationwiki 3.2Changingaredirect 3.3Brokenredirects 3.4Templateredirects 3.5Movingapage 3.6Redirecttospecialtargets 3.6.1Interwikiredirectsandredirectstospecialpages 3.6.2Aredirecttoananchor 3.6.3Aredirecttoapageintheimageorcategorynamespace 3.6.4Aredirectfromacategorypagetoanothercategorypage 3.6.5Imageslinkingtoaspecificpage 3.7CSSclass 3.8Redirectand/orlinktonon-existingpage 3.9Seealso 3.10Linkstootherhelppages Appearance[edit] Iftheredirecttargetisanexistingpageinthesameproject,goingtotheredirectpagebymeansofalink,theURL,ortheGo button,resultsintheredirecttargetpage,justlikefollowingthelink.However,thebrowsershowstheURLoftheredirectpage,andthetargetpageshowsasmallnoticeafterthetoptitletoindicateyouarrivedhereindirectly. Forexample,ifsomebodygoestoredirection,thentheywillendupatthispageinstead,andthebeginningofthepagewilllooklike: Help:Redirect FromMeta,aWikimediaprojectcoordinationwiki (RedirectedfromHelp:Redirection) TogetthecanonicalURLofthetargetpageinyourbrowser'saddressbar,clickthearticletab. Iftheredirecttargetisanon-existingpageinthesameproject,ortoapageinanotherproject,onesimplyarrivesattheredirectpage. Whenapagecalledforinclusionisaredirectpage,theredirecttargetisincludedinstead,withthesameparameters,withoutanyredirectmessage.Adoubleredirectdoesnotwork(seefurther). Restrictions[edit] Onvisitinganypageonasimplechainofredirects,thebrowserisredirectedtothefinaldestination.Ifthechainformsaloop,thebrowserisbroughttoitspredecessorandtheredirectloopisdisplayed.See,e.g.,Redirect1 → Redirect2 → Redirect3 → Redirect1. Aredirecttargetcannotdependonavariable,template,orparserfunction.Ifthatisthecase,thebrowserwillnotbeautomaticallyredirectedonvisitingthepage.See,e.g.,expr. Acodelike%70inaredirectdisablesit,althoughthelinkworksfromtheredirectpage. Someprojectshavepoliciesonwhatredirectsshouldexist.Forexample,ontheEnglishWiktionary,mostredirectsareprohibitedbypolicy. Purposesofaredirect[edit] Allowaccessinthecasethatapagenameisprovided: whichisanalternativenameforthesubject whichisanameforasubtopic(inthiscaseonemayusearedirecttoasection) whichusesalternativecapitalizationandhyphenation whichusesalternativespelling whichhasacommonmisspelling Provideawayofconvenientlygoingtoapage(shortcut). Keeplinkstoapageactiveafterithasbeenmoved(evenifinternallinksareupdated,thisstillappliesforlinksfromoutside;alsoforlinksineditsummaries). Specialpurposes[edit] Convenientlylinkingindirectlytoapage,withouttheneedforapipedlink.However,apipedlinkisinsomerespectsevenbetterthanrelyingonaredirect. Allowingalinktitleindependentofthefinallinktarget;onecreatesapagewhosenameisthedesiredlinktitle,andwhichredirectstothedesiredtargetpage.Seee.g.w:Template:Ft,containing[[30.48cm|ft]],withthepagew:30.48cmredirectingtow:Foot(unitoflength).Thelinktitle"30.48cm"informsinthehoverboxabouttheunit"ft"evenwithoutfollowingthelinktothearticleaboutthisunit.SeealsoHelp:Advancededitingforanothertechniquewithasimilarresult. Whencreatingnewredirects,bearinmindthatcreatingtoomanyredirectscanclutterupthesearchresultspage,whichcanhinderusers.Also,don'tspendtoomuchtimecreatingredirects.Oftenit'smoreimportanttospendtimeimprovingthequalityofthetargetpage.Apipedlinkisanotherwaytomakealinktoapagewithanamewhichdoesnotoccurinthefirstpage. Creatingaredirect[edit] Ifyouarecreatinganewredirect,startanewpage,write#REDIRECT[[page name]](or#redirect[[page name]])atthebeginningofthepage,wherepage nameisthenameofthetargetpage.Hereisanexample.Ifyouarereplacinganexistingpagewitharedirect,forexampleaftermergingaduplicatepage,gotothepage,editit,andreplacetheexistingtextwith#REDIRECT[[page name]]. Thepagewillnotredirectifthereisanythingonthepagebeforetheredirect.Also,theremustbenospacesbetweenthe#andtheREDIRECT. Extratextafterthe#REDIRECTcommandandlinkisignored.Itisrenderedonlyinadiff,seehere,here,andhere.Category tagsarenotignored.Ifacategoryisset,theredirect-pageislistedinthecategoryitbelongsto.Whenfollowingthelinkfromthecategorypagetotheredirectpage,thenasusualtheredirectisapplied. Aneditsummaryisautomaticallyprovided,asdisplayedatMediaWiki:Autoredircomment,butonlyifnoeditsummaryissupplied(asopposedtotheautomaticeditsummaryinsectionediting,whichcanbesupplementedbytheuser). Renderingoftheredirectpage[edit] Afteryousavetheredirectpage,yougetsenttoapagewiththestring"&redirect=no"intheURL.Thusthejustcreatedredirectpageisshown,notthepagetowhichitredirects.Theredirectpageshouldlooksomethinglike: Help:Redirection FromMeta,aWikimediaprojectcoordinationwiki Redirectpage Help:Redirect Afterthepagetitle,thecontentofMediaWiki:Redirectpagesub(bydefaultthetext"Redirectpage"),abentarrow,andthelinktotheredirecttargetisrendered.Thislinkshowsthecanonicalformofthetarget.Asmentionedpreviously,thetextafterthelinktotheredirecttargetisignored,exceptforcategorytags. Toseeyourredirectworking,useyouraddressbartodeletethatpartoftheURL.Alternatively,createalinkonanotherpagetoyourredirect,andthenfollowthatlink. Changingaredirect[edit] Whenchangingaredirecttargettoadifferentpage,orturnaredirectpageintoaregularpage,youmustgototheredirectpage.Todoso,clickonalinktotheredirectpage.Thenlookforthelinktotheredirectpageatthetopofthepageyou'vebeenredirectedto;e.g. (RedirectedfromHelp:Redirection) Onceyougettotheredirectpage,clickEditthispage.Youcantheneitherchangethetargetoftheredirect,replacetheredirectwithabrandnewpageorreverttoanearlierversionofthearticle,beforeitbecamearedirect. Anotherwaytogettotheredirectpage:Gotothetargetpage,andclick"Whatlinkshere".Thiswillshowyoualltheback-linksfromthatpage,includingredirects.Tochangearedirect,clickonit,andthenclickonEditthispageaspreviously. Brokenredirects[edit] Abrokenredirectisaredirectwhosetargetpagedoesnotexist.Thistypeofredirectdoesnotfunctionandredirectionwillnotoccur.BrokenredirectsareloggedatSpecial:BrokenRedirects. Onmanywikisadministratorssimplydeletethem,butitissometimesusefultokeepabrokenredirectandwaitforthecreationofthetarget,ortosetanewtarget.Foranexample,seeHelp:Redirect/Brokenredirect. Templateredirects[edit] Callstoatemplatethatredirectstoanothertemplatewillresultinthetransclusionandfunctionofthetargettemplate.Doubleredirectsandbrokenredirectsdonotworkasusual.Seealsothehelppageontemplates. Forexample,wehavethechain/doubleredirect → /singleredirect → /Target.Thetemplatecall{{/doubleredirect}}isrenderedas: Redirecttarget Movingapage[edit] Whenapageismoved,aredirectfromtheoldtothenewpagenameisautomaticallycreated. Ifthenewpagenameisoccupiedbyaredirectthathasonlyoneeditinitshistoryandtargetedtotheoldpagename,itisreplacedbythepagebeingmoved.Iftheredirecthasmorethanonehistoryentry,ortheredirecttargetissomewhereelse,thenitcanonlybedeleted-and-movedbyanadministrator. Redirecttospecialtargets[edit] Interwikiredirectsandredirectstospecialpages[edit] Interwikiredirectsandredirectstospecialpageshavebeendisabled,trye.g.Help:InterwikiredirectdemoandHelp:Redirecttospecialpagedemo. Usedirectinterwikilinks(ordirectlinkstoSpecialpages)withoutredirect,orasoftredirect(non-automatic). Aredirecttoananchor[edit] Onemayredirecttoananchor,inparticularasection.Help:Sectionlinkingandredirectsisanexampleanditstargetalsoprovidesmoreinfo.(Itdoesnotworkforeveryenvironment.) Onemethodisthefollowingsyntax:#REDIRECT[[target_page#section_title]] Sectionredirectsaresupposedtoworkfromr18220onwards.Seebugzilla:218.Ifitdoesnotwork,youwillberedirectedtothecorrectpagebutyouwillnotbesenttotheintendedsection. Aredirecttoapageintheimageorcategorynamespace[edit] OnMetaandWikipediaaredirecttoanimagepageortoacategoryshowstheeditabletextonly.Togetthefullpageafterbeingredirected,usethelink"File",or"Category",respectively. OnCommonsaredirecttoacategorygivesthefullpage,butnotthesubcategoriesandpagesintheredirectpage(ifthatisalsoacategory). Topreventapagethatredirectstoacategoryfromappearinginthecategory;precedetheword Categorywithacolonlikeso : #REDIRECT[[:Category:Glossary]] Aredirectfromacategorypagetoanothercategorypage[edit] Aswithnormalpages,(onMeta,othersnottested)acategorypageitselfcanberedirectedtoanothercategorypage.Thisisusefulwhenmanydifferentarticlepageshavebeenassignedtovariationsoraliasesofthesame"proper"category,evenifonlyasatemporaryfixuntilallareunified.Forexample,pagesassignedtoUNorg,UnitedNations,andUnitedNationswouldallobviouslyrefertotheoneproperCategory:UnitedNationssoeachwouldberedirectedthereasabove.Inaddition,tohelpmanagethelistofsuchalias-redirects,theycanallbeassignedtoonecommonsubcategoryunderthepropercategory. Foraliveexample,aliasescategory:$1xandcategory:$1yredirecttopropercategory:$1whilesub-category:$1rof$1holdsthealiaslist.Note:Editorspleasemakecategory:$1xyandthenrenameallthesepageswithclearernames-TY! Imageslinkingtoaspecificpage[edit] Therearewaystomakeanimagelinktoaspecifiedpage,somewhichworkespeciallywellonMediawikisitesthatsupportembeddingexternalimages.Forpossibilities,seeHelp:Navigationalimage.ByDeeDriscollappointeeforUSAttorney'sOfficeWashingtonDC. CSSclass[edit] WiththenewpreprocessoraninternallinktoaredirectpagehasCSSclass "mw-redirect".Thiscanbeusefultomakethemstandout,forclean-upworkinvolvingbypassingredirects. Redirectand/orlinktonon-existingpage[edit] WhenBisasubtopicofA,andBdoesnothaveitsownpage,oratleastnotwithadditionalinfo,therearethefollowingpossibilities: RedirectBtoA,usethebacklinktogofromAtoB(disadvantage:notveryinvitingtocreateanewcontentpageB;inconvenientifAhasmanybacklinks). LinkAtoB("redlink")asinvitationorpreparationforcreatingpageB;usethebacklinktogofromBtoA(disadvantage:notobviousfornewbie,muchlessconvenientthanautomaticredirect,especiallyifBhasmanybacklinks). Both(indirectself-linkonA).TogofromAtoB,clickthelinkfromAtoB,whichbringsyoubacktoA,andusethelinkintheredirectmessage(fordetectingaredirectseehereinbefore;however,thereisnodistinctionbetweenaredirectback,andanonwardredirect)(disadvantage,asfarasnotyetmentioned:notobviousfornewbie). DittobutwithasoftredirectfromBtoA,i.e.apageonlycontainingsomethinglike"See[[A]]";onecanseeatAthatBisveryshortusingthestub feature(disadvantages:asoftredirectisnon-standard;peoplewhodonotknowaboutitsreasonmaychangeitinaregularredirect;isalittlelessconvenientthanautomaticredirect;requiresstubfeaturesetting) Bisaredirect,linkfromAtoBwith"redirect=no",orlinktoB'seditpage,e.g.TemplateandstartpageTemplate,respectively. Inthe3rdand4th cases,especiallyifAhasalistoflinkstopagesB,onecanmarkthelinkswithmoreinfo,e.g.bybolding,andexplainthemarking. Seealso[edit] Detectinglinkstoredirectsusingthestubfeature Don'tdeleteredirects Redirectsinsearchresults-proposedsoftwarechanges Redirecteduserpagesconsideredharmful w:Wikipedia:Redirect DeletionpolicyonWikipediaforredirects Doubleredirectfixer Help:Settingupclient-sideredirects Pagedatabasetablemanualforhowredirectsarestored Linkstootherhelppages[edit] Helpcontents Meta ·Wikinews ·Wikipedia ·Wikiquote ·Wiktionary ·Commons: ·Wikidata ·MediaWiki ·Wikibooks ·Wikisource ·MediaWiki: Manual ·Google Versionsofthishelppage(forotherlanguagesseefurther) WhatlinkshereonMetaorfromMeta ·Wikipedia ·MediaWiki Reading Go ·Search ·Stopwords ·Namespace ·Pagename ·Section ·Backlinks ·Redirect ·Category ·Imagepage ·Specialpages ·Printableversion Trackingchanges Recentchanges(enhanced)|Relatedchanges ·Watchingpages ·Diff ·Pagehistory ·Editsummary ·Usercontributions ·Minoredit ·Patrollededit Logginginandpreferences Loggingin ·Preferences ·Userstyle Editing Startinganewpage ·Advancedediting ·EditingFAQ ·Edittoolbar ·Export ·Import ·Shortcuts ·Editconflict ·Pagesize Referencing Links ·URL ·Pipedlinks ·Interwikilinking ·Footnotes Styleandformatting Wikitextexamples ·CSS ·Referencecard ·HTMLinwikitext ·Formula ·List ·Table ·Sorting ·Colors ·Imagesandfileuploads Fixingmistakes Showpreview ·Testing ·Revertingedits Advancedfunctioning Expansion ·Template ·Advancedtemplates ·Parserfunction ·Parameterdefault ·Variable ·Systemmessage ·Substitution ·Array ·Calculation ·Transclusion Others Specialcharacters ·Renaming(moving)apage ·Preparingapagefortranslation ·Talkpage ·Signatures ·Sandbox ·Legalissuesforeditors Languages: English ·dansk ·Deutsch ·español ·français ·italiano ·Türkçe ·русский ·한국어 ·日本語 Retrievedfrom"https://meta.wikimedia.org/w/index.php?title=Help:Redirect&oldid=22520095" Categories:ReaderhandbookRedirects Navigationmenu Personaltools EnglishNotloggedinTalkContributionsCreateaccountLogin Namespaces HelppageDiscussion English expanded collapsed Views ReadEditViewhistory More expanded collapsed Search Navigation MainpageWikimediaNewsTranslationsRecentchangesRandompageHelpBabel Community WikimediaResourceCenterWikimediaForumMailinglistsRequestsBabylonReportsResearchPlanetWikimedia BeyondtheWeb MeetWikimediansEventsMovementaffiliatesDonate Tools WhatlinkshereRelatedchangesSpecialpagesPermanentlinkPageinformationCitethispageWikidataitem Print/export CreateabookDownloadasPDFPrintableversion Inotherprojects WikimediaCommonsMediaWikiWikidataWikinewsWikipediaWikiquoteWikivoyage Inotherlanguages অসমীয়াBrezhonegCatalàDanskDeutschΕλληνικάEnglishEsperantoEspañolفارسیFrançaisGalegoItaliano日本語ភាសាខ្មែរRipoarischLëtzebuergeschLietuviųМакедонскиမြန်မာဘာသာNederlandsNorskଓଡ଼ିଆPolskiPortuguêsၽႃႇသႃႇတႆးSimpleEnglishไทยTürkçeTiếngViệt中文粵語 Editlinks
延伸文章資訊
- 1Create and manage URL redirects - Knowledge Base - HubSpot
- 2Wikipedia:How to make a redirect
A redirect is a special type of article that sends the reader to another article. They are used w...
- 3Help:Redirect - Wikipedia
Open the "page options" menu (icon with three parallel horizontal bars) at the top right of the e...
- 4Redirect - Wikipedia
Redirect Message (ICMP), a mechanism for routers to convey routing information to hosts · Redirec...
- 5Wikipedia:Redirect/Deletion reasons
The major reasons why deletion of redirects is harmful are: a redirect may contain non-trivial ed...