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

新加坡云服务器 1核2Gg 46元/月 香港云服务器 1核2G 74元/月 LightNode

LightNode是一家成立于2002年,总部位于香港的VPS服务商。提供基于KVM虚拟化技术.支持CentOS、Ubuntu或者Windows等操作系统。公司名:厦门靠谱云股份有限公司官方网站:https://www.lightnode.com拥有高质量香港CN2 GIA与东南亚节点(河内、曼谷、迪拜等)。最低月付7.71美金,按时付费,可随时取消。灵活满足开发建站、游戏应用、外贸电商等需求。首...

DogYun27.5元/月香港/韩国/日本/美国云服务器,弹性云主机

DogYun怎么样?DogYun是一家2019年成立的国人主机商,称为狗云,提供VPS及独立服务器租用,其中VPS分为经典云和动态云(支持小时计费及随时可删除),DogYun云服务器基于Kernel-based Virtual Machine(Kvm)硬件的完全虚拟化架构,您可以在弹性云中,随时调整CPU,内存,硬盘,网络,IPv4路线(如果该数据中心接入了多条路线)等。DogYun弹性云服务器优...

Dataideas:$1.5/月KVM-1GB/10G SSD/无限流量/休斯顿(德州)_主机域名

Dataideas是一家2019年成立的国外VPS主机商,提供基于KVM架构的VPS主机,数据中心在美国得克萨斯州休斯敦,主机分为三个系列:AMD Ryzen系列、Intel Xeon系列、大硬盘系列,同时每个系列又分为共享CPU和独立CPU系列,最低每月1.5美元起。不过需要注意,这家没有主页,你直接访问根域名是空白页的,还好他们的所有套餐支持月付,相对风险较低。下面以Intel Xeon系列共...

rewritecond为你推荐
php虚拟主机免费的国内的php虚拟主机有吗vps试用求个免费现成的vps(可永久可试用)网站空间域名网站制作 域名和空间台湾主机台湾版本的主机好不好?php虚拟空间我已经有一套网站php代码和模板,并且有自己的虚拟空间和域名,怎么才能把我的代码加入到网站上.国内最好的虚拟主机国内安全性最好的虚拟主机空间商有哪些?虚拟主机评测网怎么选一台好的虚拟主机河南虚拟主机新网的虚拟主机怎么样?备案域名购买现在备案一个域名要多少钱?我想备案域名新网域名新网的网址是多少?域名多少钱?
免费国际域名 bandwagonhost tier 国外空间 hostker 股票老左 腾讯实名认证中心 佛山高防服务器 银盘服务是什么 安徽双线服务器 阿里云官方网站 宿迁服务器 北京主机托管 免备案jsp空间 免费获得q币 windowssever2008 winserver2008 windowsserver2008r2 cx域名 月付空间 更多