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

创梦网络-江苏宿迁BGP云服务器100G高防资源,全程ceph集群存储,安全可靠,数据有保证,防护真实,现在购买7折促销,续费同价!

官方网站:点击访问创梦网络宿迁BGP高防活动方案:机房CPU内存硬盘带宽IP防护流量原价活动价开通方式宿迁BGP4vCPU4G40G+50G20Mbps1个100G不限流量299元/月 209.3元/月点击自助购买成都电信优化线路8vCPU8G40G+50G20Mbps1个100G不限流量399元/月 279.3元/月点击自助购买成都电信优化线路8vCPU16G40G+50G2...

桔子数据58元/月 ,Cera美西云服务器 2核4G 50G数据盘 500M带宽 1000G流量

桔子数据(徐州铭联信息科技有限公司)成立于2020年,是国内领先的互联网业务平台服务提供商。公司专注为用户提供低价高性能云计算产品,致力于云计算应用的易用性开发,并引导云计算在国内普及。目前公司研发以及运营云服务基础设施服务平台(IaaS),面向全球客户提供基于云计算的IT解决方案与客户服务,拥有丰富的国内BGP、双线高防、香港等优质的IDC资源。 公司一直秉承”以人为本、客户为尊、永...

NameCheap域名转入优惠再次来袭 搜罗今年到期域名续费

在上个月的时候也有记录到 NameCheap 域名注册商有发布域名转入促销活动的,那时候我也有帮助自己和公司的客户通过域名转入到NC服务商这样可以实现省钱续费的目的。上个月续费转入的时候是选择9月和10月份到期的域名,这不还有几个域名年底到期的,正好看到NameCheap商家再次发布转入优惠,所以打算把剩下的还有几个看看一并转入进来。活动截止到9月20日,如果我们需要转入域名的话可以准备起来。 N...

rewritecond为你推荐
免费vps服务器如何免费搭建自己的vps服务器php虚拟空间虚拟空间怎么修改php.ini配置手机网站空间QQ空间技巧的手机网站啊?虚拟主机管理系统大家都用的是什么虚拟主机管理系统?分享一下淘宝虚拟主机淘宝里卖虚拟主机、独立服务器、VPS的都是怎么进货的。华众虚拟主机管理系统华众虚拟主机管理系统请问。华众 虚拟主机管理系统 这个问题 怎么解决 。就是后台可以开通虚拟主机 没有问题,但是 删除虚拟主机 后台显示删除成功的,但是实际在服务器上 文件夹 ftp iis站点 都没有被删除 是什么问题www二级域名一级域名和二级域名如何区别?例如,www.,加上了,yutian168.com,就是一级域名吗?域名网站域名和网址一样吗?中文域名英文域名和中文域名是什么意思?域名升级访问怎么通过直接访问域名,指向首页
国外虚拟空间 花生壳免费域名 enom 圣迭戈 42u机柜尺寸 ibrs 免费个人空间申请 卡巴斯基官方免费版 大容量存储器 北京双线机房 河南m值兑换 北京双线 流量计费 cdn加速是什么 umax120 酷番云 Updog 江苏双线服务器 石家庄服务器托管 服务器防火墙 更多