serverrewritecond

rewritecond  时间:2021-01-11  阅读:()
AdditionalResourcesThisappendixpointsouttherathershortlistofonlineandotherresourcesavailableforfurtherassistancewithmod_rewrite.
OnlineResourcesOnlineresourcesformod_rewritearerathersparse,andmanyoftheonlineresourcescontaininformationthatisincorrectoroutdated.
Thefollowinglistingpresentsafewofthebetterwebsiteswhereyoucanfindinformationonmod_rewrite:mod_rewriteCookbook(http://rewrite.
drbacchus.
com/):Initiallystartedasascratchpadforthebookyouarenowholding,thissiteisacollectionofpracticalsolutionstocommonproblems.
Itcontainsmanyoftherecipesinthisbook,aswellasthoseintheRewriteGuideintheonlinedocumentation.
Apachemod_rewrite(http://httpd.
apache.
org/docs/2.
1/rewrite/):Thedocu-mentationformod_rewritehastraditionallybeenalittleintimidating.
Thisisunderstandable,giventhecomplexityandpowerofthemodule.
Butthereisaneffortunderway,atthetimeofthiswriting,torefurbishthedocumentationandmakeitfriendliertothebeginner.
Apachemod_rewriteURLRewritingEngine(http://httpd.
apache.
org/docs/mod/mod_rewrite.
html):Theofficialmod_rewritedocumentationistheplacetogoforauthoritativeinformationaboutthemoduleanditsconfigurationoptions.
BooksMasteringRegularExpressions,SecondEditionbyJeffreyFriedl(O'Reilly,2002),oftenreferredtoasjustMRE,isthedefinitiveworkonregularexpressions.
RegularExpressionRecipes:AProblem-SolutionApproachbyNathanA.
Good(Apress,2005)presentsacompendiumof100regularexpressionsolutionsforPHP,Perl,Python,grep,sed,andVim.
133APPENDIXPCREDocumentationPCREstandsforPerlCompatibleRegularExpressions.
TounderstandPCRE,youshouldturntoPerl.
AtthecommandlineonanymachinewithPerlinstalled,typeperldocperlreforthePerlregularexpressiondocumentation.
Orreaditonlineathttp://perldoc.
perl.
org/perlre.
html.
APPENDIXADDITIONALRESOURCES134NumbersandSymbols|(alternation)syntax,functionof,17–18*(asterisk)characterformatchingzeroormorecharacters,10–11inregularexpressions,8\(backslash)characterasescapecharacter,9inregularexpressions,8[](brackets)formatchingoneofagroupofcharacters,13inregularexpressions,8^(caret)characterdenoting"thestringstartswith",37inregularexpressions,8\d{3}metacharacter,representationforphonenumbers,16-(dash),replacingwith_(underscore)inaURI,42$(dollarsign)characterdenoting"thestringendswith",37inregularexpressions,8!
(exclamation)characterfornegatinganentireregularexpressionmatch,13–14inregularexpressions,8\(metacharacter,representationofanoptionalopeningparenthesis,15()(parentheses)forgroupingandcapturingseveralcharactersasaunit,11–12inregularexpressions,8%(percentagesign),usingwithRewriteCond,12.
(period)characterforpatternmatchinginregularexpressions,9inregularexpressions,8+(plussign)characterformatchingoneormorecharacters,10inregularexpressions,8#(poundsign)forcommentingoutlinesinconfigurationfiles,26resultsofusinginarewritetarget,42–43(questionmark)characterformakingasinglecharactermatchoptional,11inregularexpressions,8""(twoquotationmarks),usingforcomparisontests,54_(underscore),replacing-(dash)withinaURI,42Aaccesscontrolwithmod_rewrite,91–94simpleclient-based,94–97usingmod_rewritetosolveproblemswith,89–97usingtheallowanddenydirectivesforaddress-based,89–90AddModuledirectives,inconfigurationfiles,26–27address-basedaccesscontrol,usingtheallowanddenydirectivesfor,89–90Alias,using[PT]withtomapaURItoadirectory,44Aliasdirectives,resolvingissuesofallquittingworking,106–107AllowOverridedirective,settingtopermituseofmod_rewritedirectives,29anchorcharacters,9–10Apache,third-partydistributionsof,21–22Apache1.
3installingmod_rewriteasasharedobjecton,24–25limitingproxyserveraccessin,115Apache2.
xinstallingmod_rewriteasasharedobjecton,25limitingproxyserveraccessin,115Apachemod_rewrite.
Seealsomod_rewritewebsiteaddressfordocumentationfor,133Apachemod_rewriteURLRewritingEngine,web-siteaddressfordocumentationfor,133Apachemodules,enablingordisablinginstalled,26Apachewebserver,installationdocumentation,22applicationserver,proxyingto,118apxsutility,foraddingmod_rewriteasasharedobjectwithoutrecompilingApache,24–25asterisk(*)character.
See*(asterisk)characterBbackreferences,containedinarewritetarget,36backslash(\)character.
See\(backslash)characterbinaryinstallation,ofmod_rewrite,25–27brackets([]).
See[](brackets)C[C]or[chain]flag,forRewriteRule,37–38canonicalhostname,codeexampleforrequiringtoreachourwebsite,75–76caret(^)character.
See^(caret)character[chain]or[C]flag,forRewriteRule,37–38Index135characters,using[](brackets)formatchingoneofagroupof,13cleanURLscreatingwithmod_rewrite,2exampleof,41clientvariables,forRewriteConddirective,48–49client-basedaccesscontrol,withmod_rewrite,94–97[CO]or[cookie]flag,forRewriteRule,38–39codeexampleaddingmapfileconfigurationlinestotheconfigurationfile,109foraddingvirtualhoststoyourApacheconfigurationfile,100alternativetousingmod_rewritetoblockaspiderfromhammeringyourwebsite,95forcausingApachetosendanHTTP410Gonestatuscode,40forchanginguppercaseormixedcasefilenamestolowercase,67forcomparisontestsusingRewriteConddirective,54ofconfigurationfileforrandomizedrewrites,63–64forconfiguringvirtualhosts,102forcreatingaRewriteMapthatmapshostnamestodirectorypaths,108forcreatingper-lettersubdirectorieswithmod_rewrite,106forcreatingtxtmapfiles,61fordenyingaccesstousersnotusingFirefox,90forenablingmod_rewritebinaryinstallation,26–27forenablingtheRewriteLog,29,123forexcludingcontentfromtheproxy,119forexpressinganemailaddressasaregularexpression,14–15forforcingtargetURLtobehandledwithaspecificcontent-handler,41forforcinguserstocomethroughthefrontdoor,85–86forfurthersubdivisionsforvirtualhosts,103forgivingdifferentcontententirelytointernalandexternalviewers,84forgroupingandcapturingseveralcharactersasaunit,11–12forinstallingmod_rewriteasasharedobjectonApache1.
3,24–25forinstallingmod_rewriteasasharedobjectonApache2.
x,25forinstallingmod_rewriteasastaticallycompiledmodule,23invokinghttxt2dbmutilitywithnoarguments,65forlimitingaccesstoproxyserverinApache1.
3,115forlimitingaccesstoproxyserverinApache2.
x,115forloggingtoasinglelogfileandthensplittingthelogfilelater,110forlookinginmorethanoneplaceforafile,74formakingamatchoptional,11formakingclientcertificatevalidationerrormessagesmoreunderstandable,87formatchingadirectory,18formatchingafiletype,18formatchinganycharacter,9formatchingaphonenumber,15–16formatchingoneofagroupofcharacters,13formatchingoneormorecharacters,10formatchingthehomepage,17–18formatchingzeroormorecharacters,10–11innonproxyenvironmenttolookinseveralplacesforrequestedfile,120foronedirectoryperletterforvirtualhosts,103Perlscriptforreplacing-(dashes)with_(underscores),66–67forplacingRewriteConddirectivesbeforetheRewriteRules,107–108forpointingRewriteMapdirectiveatnewlycreateddatabase,65forpreventingimagetheftfromyourwebsite,53,96–97forpreventinguploadingofPHPfileandthenexecutingthem,86forprotectingagainstgettingtothecontestpageoutsideofdatesrange,82forproxyinganentirevirtualhosttoanotherserver,116forproxyingaparticularfiletypetoaback-endimageserver,117forproxyingasingledirectorytoanotherserver,116forproxyingofthe/images/directoryonafront-endserver,117forproxyingrequeststooldserverifcontentisnotonnewserver,120forredirectingto/maintenance.
htmlunlessyou'realreadythere,80forredirectingusersbasedontheirbrowsertype,83forreplacing-(dash)with_(underscore)inaURI,42forrequiringacanonicalhostnametoreachourwebsite,75resolvingissuesofCGIandscriptsservedasplaintext,107–108forrewriteblockinan.
htaccessfileindocumentrootdirectory,80forRewriteRuledirectivesyntax,32forrewritingfailingrequeststoanotherserver,75forrewritingpathinformationtoaquerystring,69–73ofrulesetforasimplerewritetoafilepath,105forsendingexternaluserselsewhere,84forservingdifferentcontentbasedonuser'susername,85ofasimpleRewriteLogexample,124INDEX136solutionforensuringaccesstoasiteisavailableviaSSL,77solutiontoviewingthewrongSSLhost,76forsplittingalogfileintoitscomponentparts,110switchingfromColdFusiontoPHPandmakingoldURLswork,73fortellingusersacontestisover,83fortestingwhethermod_rewriteiscorrectlyinstalled,27using[cookie]or[CO]flag,39using[env]or[E]flag,39using[OR]orornextflagwithRewriteConddirective,56using[QSA]flag,44using[R]flagwithRewriteRuledirective,45usingfordenyingaccesstoURIs,90usinganchorcharacters,9–10usingdate-andtime-basedrewrites,82usingenvironmentvariablesandmod_rewritetoblockaspider,95forusingenvironmentvariablewithRewriteConddirective,53usingForbiddenor[F]flag,40forusingfront-endserverasloadbalancer,63forusingHTTPMIMErequestheaderwithRewriteConddirective,53usingIncludeconfigurationdirective,100usingmod_rewritefordenyingaccesstoaparticulardirectory,92usingmod_rewritefordenyingaccesstoseveraldirectoriesatonce,93usingmod_rewriteforproxyingeverythingconfiguration,117usingmod_rewritetoblockaspiderfromhammeringourwebsite,94usingnegation,14usingNoEscapeor[NE]flaginarewritetarget,43usingPassthruor[PT]flag,44usingProxyor[P]flag,43usingProxyPassdirective,113usingRedirectdirective,4–5usingRedirectMatchdirective,5,36usingRewriteConddirectivetopreventlooping,56usingRewriteCondinRewriteLogexample,127–128usingRewriteCondsyntax,47–48usingRewriteCondtestflagstocheckifafileisonanoldserver,55usingRewriteCondtopreventarulefromlooping,47usingRewriteCondtoresolveproblemsassociatedwithhostnames,105usingRewriteMapdirective,59usingRewriteMapwithaprg:maptypeformorethanninearguments,72usingRewriteRuleflags,37usingrewritetarget,36forusingSSLenvironmentvariablewithRewriteConddirective,53usingthe[S]orSkipflag,46usingthe[T]orTypeflag,46usingtheallowanddenydirectivesforaddress-basedaccesscontrol,89–90usingtheNoCaseor[NC]flag,42usingtheRewriteBasedirective,33usingtime-basedredirection,50comparisonoperators,tocompareateststringwithsomeothervalue,54competitionwebsite,showingonlyduringacompetition,81–83conditionalchanges,withmod_rewrite,3conditionalrewrites,examplesforcommontasksandafewnot-so-commontasks,79–87configurationfilescommentingoutlinesin,26importanceofrestartingApacheaftermakingchangesto,36mainserver,32–33configuringandinstallingmod_rewrite,21–30cookieflag,forsettingasapartofarewritingtransaction,38–39[cookie]or[CO]flag,forRewriteRule,38–39D-dtestflag,usingtoseeiftheTestStringexistsasafilepathandisadirectory,54date-andtime-basedrewrites,81–83date/timevariables,forRewriteConddirective,50dbm:maptype,creatingwithRewriteMapdirective,64–65dbmrewritemaprewritefunction,usableinRewriteRule,65debuggingwithRebug,131–132yourrewriterulesandregularexpressions,123–132blocksand.
htaccessfiles,generalrulefor,91directorymatching,18documentation,forinstallingApachewebserver,22dollarsign($)character.
See$(dollarsign)characterE[E]or[env]flag,forsettingthevalueforanyenvironmentvariable,39–40emailaddress,regexexamplefor,14–15Engelschall,Ralf,mod_rewritewrittenby,6[env]or[E]flag,forsettingthevalueforanyenvironmentvariable,39–40environmentvariable,flagforsettingforany,39–40INDEX137Finditfasterathttp://superindex.
apress.
com/environmentvariable-basedaccesscontrol,fordenyingaccesstousersnotusingFirefox,90errormessagesexampleshowingmod_rewriteisnotinstalled,29exampleshowingmod_rewritenotproperlyinstalled,28solutionwhenclientcertificatevalidationisindecipherable,87escapecharacter,\(backslash)characteras,9exclamation(!
)character.
See!
(exclamation)characterF-ftestflag,usingtoseeiftheTestStringexistsasafilepathandisafile,54-Ftestflag,usingtoseeiftheTestStringisavalidfileandisaccessible,54favicon.
icofiles,websiteaddressforinformationaboutandhowtocreatethem,126filetype,matching,18flags.
SeeRewriteRuleflagsForbiddenor[F]flag,forforcinganHTTP403Forbiddenstatuscode,40forwardproxyingfunctionof,114–115usingProxyRequestsdirectivetoforbid,114–115Friedl,Jeffrey(O'Reilly,2002),MasteringRegularExpressions,SecondEditionby,7,133FTPaddresses,codeforproxying,113G[G]orGoneflag,forcausingApachetosendanHTTP410Gonestatuscode,41GNUTalkFilters,websiteaddressforobtaining,119Goneor[G]flag,forcausingApachetosendanHTTP410Gonestatuscode,40Good,NathanA.
(Apress,2005),RegularExpressionRecipes:AProblem-SolutionApproachby,133greedymatching,inregularexpressions,11H[H]orHandlerflag,forforcingtargetURLtobehandledwithaspecificcontent-handler,41hash-typemaps,creatingwithRewriteMapdirective,64–65homepage,matching,17–18hostnamesusingRewriteConddirectivetoresolveproblemsassociatedwith,105whatworksanddoesn'twork,102.
htaccessfilesenabling,28importanceofremovingleadingslashfromRewriteRule,106performancedegradationfromuseof,34RewriteRulein,128–130HTTP403Forbiddenstatuscode,flagforforcing,40HTTP410Gonestatuscode,causingApachetosend,40httxt2dbmutility,forgeneratingaDBMfileforusebyRewriteMapdirective,65Iimagetheftcurtailing,53preventingfromyourwebsite,95–97Includeconfigurationdirective,forkeepingtrackofvirtualhostconfigurationfiles,100installationdocumentation,forinstallingApachewebserver,22installingandconfiguringmod_rewrite,21–30installingfromsourcemod_rewriteasasharedobject,23–25mod_rewriteasastaticallycompiledmodule,23int:maptypecreatingwithRewriteMapdirective,67internalRewriteMapfunctionnames,67internalfunctionnames,forinternalRewriteMap,67IP-basedvirtualhostsvs.
name-basedvirtualhosts,99L-ltestflag,usingtoseeiftheTestStringexistsasafilepathandisasymboliclink,54[L]orLastflagforindicatingtheendoftherewritingprocesshasbeenreached,41fortellingtherewriteenginewe'redone,62Lastor[L]flag,forindicatingtheendoftherewritingprocesshasbeenreached,41Lifetimeargument,forsettinghowlongacookieshouldberetained,38LoadModuledirectives,inconfigurationfiles,26–27loghandlers.
Seepipedloghandlersloggingcommoncomplaintaboutmod_vhost_alias,104formassvirtualhosts,109–111loopingavoidanceof,126–128preventingbyusingRewriteConddirective,56–57usingconditionalrewritesfor,79–81loopingrewriterule,defined,79Mmassvirtualhosting,2–3loggingfor,109–111MasteringRegularExpressions,SecondEdition,byJeffreyFriedl(O'Reilly,2002),7,133INDEX138matching,oneofagroupofcharacters,13MaxRedirectsoption,forsettingredirectionlimit,56metacharacter,defined,9mod_ext_filter,websiteaddressfordocumentationfor,118mod_proxyuseofbymod_rewritetoforcerequeststoanotherserver,113–121websiteaddressforfulldocumentationfor,121mod_proxy_html,websiteaddressforinformationabout,116mod_proxy_http,inApache2.
x,113mod_rewriteaccesscontrolwith,91–94binaryinstallation,25–27booksaboutregularexpressions,133checkingtoseeifitisinstalled,29creatingcleanURLswith,2creatingper-lettersubdirectorieswith,106denyingaccesstoaparticulardirectorywith,91–93denyingaccesstoseveraldirectoriesatoncewith,93–94exampleerrormessagewhennotproperlyinstalled,28installing,22–28installingandconfiguring,21–30installingandconfiguringifyouarenotthesystemadministrator,28–29installingasasharedobjectonApache1.
3,24–25installingasasharedobjectonApache2.
x,25anintroductionto,1–6limitationsoftranslatingahostnameintoadirectorypathwith,2–3massvirtualhostingwith,104–109proxyingwith,117–120proxyingwithout,116RewriteRuledirectiveasmainworkhorseof,31–46testingwhetheritiscorrectlyinstalled,27–28useofmod-proxybytoforcerequeststoanotherserver,113–121usingaslastsolution,6usingforrenamingandreorganization,73–77usingtoadjustURLsfromonelayouttoanother,69–73usingtoproxyaparticularfiletype,117–118whennottouse,4–6whennottouseforaccesscontrolproblems,89–91whentouse,1–3mod_rewriteCookbook,websiteaddressfor,133mod_vhost_aliasconfiguringvirtualhostswith,101–104hostname-to-directorymappingprovidedby,6inflexibilityof,104modifierflags,forRewriteConddirective,55–56N{n,m}repetition,syntaxfor,16[N]orNextflag,forindicatingtherewritingprocessshouldberestartedfromthebeginning,41–42name-basedvirtualhostsvs.
IP-basedvirtualhosts,99[NC]ornocaseflag,usingtomakeaRewriteConddirectivecaseinsensitive,55[NC]orNoCaseflag,usingtomakeaRewriteRulecaseinsensitive,42[NE]orNoEscapeflag,usinginarewritetarget,42–43negation(!
),ofanentireregularexpressionmatch,13–14Nextor[N]flag,forindicatingtherewritingprocessshouldberestartedfromthebeginning,41–42NoCaseor[NC]flag,usingtomakeaRewriteRulecaseinsensitive,42NoEscapeor[NE]flag,usinginarewritetarget,42–43NoSubrequestor[NS]flag,usingwithRewriteRuledirective,43nocaseor[NC]flag,usingtomakeaRewriteConddirectivecaseinsensitive,55[NS]orNoSubrequestflag,usingwithRewriteRuledirective,43Oonlineresources,133openforwardproxy,risksassociatedwith,114–115[OR]orornextflag,usingwithRewriteConddirective,56ornextor[OR]flag,usingwithRewriteConddirective,56P[P]orProxyflag,usingwithRewriteRuledirective,43parentheses[()].
See()(parentheses)Passthruor[PT]flag,usingwithRewriteRuledirective,43–44PCREdocumentation,websiteaddressfor,20,134PCRE(PerlCompatibleRegularExpression)vocabulary.
Seeregularexpressionspcretestutility,forcomparingaregularexpressionagainstatestpattern,132per-dir(per-directory)contextexamples,34–35inRewriteRuledirective,32whennottouse,34per-direxamples,correlationbetweentheURIandwhatRewriteRulehastoworkwith,34per-directory(per-dir)context.
Seeper-dir(per-directory)contextperiod(.
)character.
See.
(period)characterINDEX139Finditfasterathttp://superindex.
apress.
com/PerlCompatibleRegularExpression(PCRE)vocabulary.
Seealsoregularexpressionswebsiteaddressfordocumentationfor,134Perlregularexpressiondocumentation,websiteaddressforobtaining,20permalinks,cleanURLsreferredtoas,2phonenumber,regexexamplefor,15–16PHPfiles,preventinguploadingandexecutionofbyusers,86–87pipedloghandlers,using,110–111plussign(+)character.
See^(caret)characterprg:rewritemaptypecreatingwithRewriteMapdirective,66–67exampleforreplacing-(dashes)with_(underscores),66–67proxiedcontent,modifying,118–119Proxyor[P]flag,usingwithRewriteRuledirective,43proxyrewriterules,113–114proxying,113–121toanapplicationserver,118excludingcontentfromtheproxy,119–120withmod_rewrite,117–120aparticularfiletypetoaback-endserver,117–118requesttooldserverifcontentisnotonnewserver,120withoutmod_rewrite,116ProxyPassdirectiveusinginsteadofmod_rewriteforproxying,113usingtoproxyasingledirectorytoanotherserver,116ProxyPassReversedirectivefunctionofwhenproxyingwithoutmod_rewrite,116useofwithRewriteConddirective,55ProxyRequestsdirective,usingtoforbidforwardproxying,114–115[PT]orPassthruflag,usingwithRewriteRuledirective,43–44Q[QSA]orQueryStringAppendflag,usingwithRewriteRuledirective,44questionmark()character.
See(questionmark)characterR[R]orRedirectflagindicatingthattherewriteisaredirectwith,62usingwithRewriteRuledirective,45randomizedrewrites,usingforloadbalancing,62–64Rebugdebuggerdisplayingvaluesassignedduringthematchingprocess,132websiteaddressforobtaining,19,131writteninPerltoprovideagraphicalfront-end,19–20Redirectdirectiveexamplesof,4–5usingRedirectMatchdirectiveinplaceof,6Redirector[R]flag,usingwithRewriteRuledirective,45redirecting,basedonclientconditions,83–87redirection,simpleasmostcommonmisuseofmod_rewrite,4–5RedirectMatchdirectiveusingformorecomplicatedredirects,5–6usingvs.
Redirect,6Redirects,usingRedirectMatchdirectiveformorecomplicated,5–6regexbuildingtools,fortestingregularexpressions,130–132RegexCoachavailableforWindowsandLinux,20websiteaddressforobtaining,132regexexamples,14–18regexsyntax,referencefor,7–14regextools,18–20RegularExpressionDebugger(Rebug),downloading,19,131regularexpressionexamples,14–18RegularExpressionRecipes:AProblem-SolutionApproach,byNathanA.
Good(Apress,2005),133regularexpressionsthebuildingblocksfor,7–14mod_rewritebuiltupon,7–20vocabularytable,8renamingandreorganization,usingmod_rewritefor,73–77requestvariables,forRewriteConddirective,49reverseproxying,functionof,114–115rewriteblock,exampleofflowof,52rewritelog,addingdirectivestoturnon,29–30rewritepattern,functionof,35rewriterules,usingmod_rewrite,3rewritetarget,thesecondargumentoftheRewriteRuledirective,35–37RewriteBasedirective,foralteringanimpliedbasepath,33RewriteConddirectiveadditionalvariablesthatcanbeusedin,52–53clientvariables,48–49date/timevariablesfor,50modifierflags,55–56otherspecialvariablesfor,50requestvariablesfor,49servervariablesfor,49specialtestflagsthatmaybeappliedto,54syntaxfor,47–48tableofvariables,48–50using,47–57using%(percentagesign)with,12usinginRewriteLogexample,126–128usingtopreventlooping,56–57RewriteCondpattern,53comparisontests,54INDEX140RewriteEngineOndirective,useof,124–126RewriteLogenabling,29–30,123amorecomplexrewriteexample,126–128asimpleexample,124–126usingRewriteCondinexample,126–128RewriteLogdirective,fordebuggingyourrewriterules,123–130RewriteLogLevel,setting,123RewriteMapdirectiveforcallingonsomethingexternaltohelpwithyourrewriting,59–67creatingonethatmapshostnamestodirectorypaths,108–109internalfunctionnames,67maptypesyoucancreatewith,59–67syntaxfor,59RewriteRulein.
htaccessfiles,128–130logfileentriesin.
htaccessfiles,129–130RewriteRulecontext,affectonApache'sbehaviorfromavarietyoflocations,32RewriteRuledirectiveexamplesofinefficientandsimplercodefor,80–81introductionto,31–46asmainworkhorseofmod_rewrite,31–46syntaxfor,32–35using[P]flagwithtomakeitaproxyrewriterule,113usingRedirectMatchinsteadof,5–6RewriteRuleflags,37–46rewrites,basic,69–77rnd:maptype,creatingwithRewriteMapdirective,62–64rnd:rewritetechnique,usingforotherrandomthings,63–64robot,usingmod_rewritetoblockfromhammeringyourwebsite,94–95S-stestflag,usingtoseeiftheTestStringexistsasafilepathandhasasizegreaterthanzero,54[S]orSkipflag,usingwithRewriteRuledirectivetoskipthenextnrules,45–46ScriptAliasMatchdirective,forresolvingissuesofCGIandscriptsservedasplaintext,107–108security,whenmod_proxyisenabled,114–115servervariables,forRewriteConddirective,49sharedobjectsvs.
staticallycompiledmodules,22–23simpleredirection,asmostcommonmisuseofmod_rewrite,4–5siterearrangement,usingmod_rewritefor,3Skipor[S]flag,usingwithRewriteRuledirectivetoskipthenextnrules,45–46.
so(sharedobject)file,22–23specialvariables,forRewriteConddirective,50spider,usingmod_rewritetoblockfromhammeringourwebsite,94–95split-logfilescript,forsplittingalogfileintoitscomponentparts,110SSLhost,solutiontoviewingthewronghost,76SSLRequireSSLdirective,functionof,77staticallycompiledmodule,installingmod_rewriteas,23staticallycompiledmodulesvs.
sharedobjects,22–23substitution.
Seerewritetarget"SwedishChef"translating,119websiteaddressfordetailsabout,119systemadministrator,installingandconfiguringmod_rewriteifyouarenot,28–29T[T]orTypeflagforsettingaMIMEtypeandforcingaparticularbehavior,41usingwithRewriteRuledirective,46testflagsexamplesusing,54–55thatmaybeappliedtoteststrings,54testnegation,byprefacingthepatternwithanexclamationmark(!
),54teststrings,testflagsthatmaybeappliedto,54text,anchoringtothestartandend,9–10third-partydistributions,ofApache,21–22time-basedredirection,usingRewriteConddirective,50–52troubleshooting.
Seedebuggingtxtmapfiles,creating,60–62txtmaptype,creatingwithRewriteMapdirective,60–62Typeor[T]flag,usingwithRewriteRuledirective,46U-Utestflag,usingtoseeiftheTestStringisavalidURLandisaccessible,54URI(UniformResourceIdentifier),5–6numURIs,matching,16–18URLmanipulation,mod_rewriteas"SwissArmyKnife"of,1URLpathinformation,rewritingtoaquerystring,69–73URLscreatingcleanwithmod_rewrite,2examplesforadjusting,69–73andRewriteRule'scorrespondinginterpretation,32rewritingandredirectingdynamically,1–3rewritingpathinformationtoaquerystring,69–73UseCanonicalNameOffdirective,fordisablingApache'sdefaultbehavior,110INDEX141Finditfasterathttp://superindex.
apress.
com/username,servingdifferentcontentbasedonuser's,84–85utilitiesapxs,24–25httxt2dbm,65pcretest,132Vvirtualhostsconfiguringwithmod_vhost_alias,101–104forhostname-to-directorymapping,6importanceofnotmixingtypesof,104loggingformultiple,110loggingtoasinglelogfileandthensplittingthelogfilelater,110theold-fashionedway,99–101problemoftoomanydirectories,103withRewriteMap,108–109rewriting,105–108forrunningmorethanonewebsiteonthesamephysicalserver,99–111typesof,99Wwebsite,ensuringthatallaccessesfirstvisitthefrontpage,85–86websiteaddressfor.
htaccesstutorial,28forApachewebserverinstallationdocumentation,22fordocumentationformod_ext_filter,118fordownloadingamod_rewritebinaryinstallationpackage,26fordownloadingRebugtool,19fordownloadingRegexCoach,20forfulldocumentationformod_proxy,121forinformationaboutcookies,39forinformationaboutfavicon.
icofilesandhowtocreatethem,126forinformationaboutmod_proxy_html,116forinformationaboutmod_vhost_alias,101forobtainingGNUTalkFilters,119forthePCREdocumentation,20forthePerlregularexpressiondocumentation,20INDEX142

ZJI(月付480元),香港阿里云专线服务器

ZJI是成立于2011年原Wordpress圈知名主机商—维翔主机,2018年9月更名为ZJI,主要提供香港、日本、美国独立服务器(自营/数据中心直营)租用及VDS、虚拟主机空间、域名注册业务。本月商家针对香港阿里云线路独立服务器提供月付立减270-400元优惠码,优惠后香港独立服务器(阿里云专线)E3或者E5 CPU,SSD硬盘,最低每月仅480元起。阿里一型CPU:Intel E5-2630L...

星梦云:四川100G高防4H4G10M月付仅60元

星梦云怎么样?星梦云资质齐全,IDC/ISP均有,从星梦云这边租的服务器均可以备案,属于一手资源,高防机柜、大带宽、高防IP业务,一手整C IP段,四川电信,星梦云专注四川高防服务器,成都服务器,雅安服务器。星梦云目前夏日云服务器促销,四川100G高防4H4G10M月付仅60元;西南高防月付特价活动,续费同价,买到就是赚到!点击进入:星梦云官方网站地址1、成都电信年中活动机(成都电信优化线路,封锁...

ZJI:韩国BGP+CN2线路服务器,国内三网访问速度优秀,8折优惠码每月实付440元起

zji怎么样?zji最近新上韩国BGP+CN2线路服务器,国内三网访问速度优秀,适用8折优惠码zji,优惠后韩国服务器最低每月440元起。zji主机支持安装Linux或者Windows操作系统,会员中心集成电源管理功能,8折优惠码为终身折扣,续费同价,全场适用。ZJI是原Wordpress圈知名主机商:维翔主机,成立于2011年,2018年9月启用新域名ZJI,提供中国香港、台湾、日本、美国独立服...

rewritecond为你推荐
海外虚拟主机国外虚拟主机那个比较好一点呀?国内域名注册预留的国内(cn)域名申请方法linux主机【windows主机换Linux主机该怎么弄啊?需要注意些什么呢?】asp主机空间asp空间是什么免费网站空间申请需要一个免费的网站空间申请地址。虚拟主机管理系统如何用win虚拟主机管理系统搭建虚拟主机软件问虚拟主机用什么版本的软件比较好河南虚拟主机谁那有好的虚拟主机?虚拟主机99idc网站后台织梦系统重装、空间转移、及上传技巧有哪些?安徽虚拟主机有没有免费使用的主机,网站刚做完,本地测试没有问题,想在线测试一下页面会不会跑版。有谁知道有没有免费的虚拟主机试用,两三天即可。
asp网站空间 青岛虚拟主机 宿迁服务器租用 vps优惠码cnyvps 域名解析服务器 国外主机 oneasiahost 国外idc 双11抢红包攻略 天猫双十一秒杀 网站挂马检测工具 100x100头像 1g内存 登陆空间 网通服务器 我的世界服务器ip 新加坡空间 中国域名 江苏双线 cdn服务 更多