Imigaqo yeWordPress ineZinto ezingaphandle, nazo

I-apache yamagama
Ixesha lokuFunda: 2 imizuzu

I-apache yamagamaI-WordPress yenze inyathelo eliphambili kwindaleko kwiqonga lokubhloga, ukuyisondeza kwinkqubo yolawulo lomxholo egcweleyo ngokulandela umkhondo wokuhlaziya, inkxaso ngakumbi kwiimenyu zesiko, kunye neyona nto inomdla kum-indawo ezininzi zenkxaso ngemephu yedomain.

Ukuba awuyiyo inkqubo yolawulo lomxholo junkie, kulungile. Ungatsiba ngaphaya kweli nqaku. Kodwa kwamanye ama-techno-geeks, iintloko zekhowudi kunye ne-apache-dabblers, ndifuna ukwabelana ngento enomdla, kunye nento epholileyo.

Isayithi elininzi yindawo ekuvumela ukuba usebenze naliphi na inani leewebhusayithi zeWordPress ngofakelo olunye lweWordPress. Ukuba ulawula iisayithi ezininzi, kulungile kuba ungafaka iqela elivunyiweyo lemixholo kunye neewijethi, kwaye uzenze zisebenze kwiindawo zakho zabaxumi. Kukho izithintelo ezimbalwa kubuchwephesha kwimephu yommandla wakho, kodwa inkqubo ayinzima.

Enye yeendawo ezinengxaki endizichongileyo kukwenziwa ngokwezihloko. Kuba imixholo inokwenziwa ifumaneke kwiiwebhusayithi ezininzi, naziphi na izinto ozenzayo kumxholo ziya kuchaphazela naziphi na ezinye iisayithi ezisebenzisa lo mxholo kufakelo lweendawo ezininzi. Indlela yam ejikeleze oku kukuphindaphinda umxholo ngaphambi kokuba ndiqale ukwenza ngokwezifiso, kwaye ndicacise umxholo womxholo wesiza somthengi endisenzileyo.

Omnye umba onomdla yinto eyenzekayo kwifayile ye-.htaccess kwiseva yakho ye-Apache. I-WordPress kufuneka iphinde ibhale iindlela kwi-blog-by-blog kwaye yenza oku ngomgaqo wokubhala kwakhona kunye nefayile ye-php.

I-WordPress isebenzisa lo mthetho ubhala ngokutsha:

Phinda ubhaleRule ^ ([_ _ 0-9a-zA-Z -] + /)? Iifayile /(.+) wp-kubandakanya / ms-file.php? File = $ 2 [L]

Ngokusisiseko, nantoni na ekwi-subdirectory ye-mysite.com/files/directory ibhalwa kwakhona kwi-mysite.com/files/wp-includes/myblogfolderpath ...... kwaye kulapho iba nomdla khona. Kwenzeka ntoni ukuba ufuna ifayile kwifayile yakho ethi mysite.com/files/myfolder/myimage.jpg? Ufumana impazamo engama-404, yile nto yenzekayo. Umgaqo wokubhala kwakhona we-Apache uyakhaba kwaye utshintshe indlela.

Kuyavunywa, awungekhe uhlangane nale ngxaki, kodwa ndiyenzile. Ndinesiza esifuna ukusebenzisa iwijethi yejavascript evela kwenye iwebhusayithi, kwaye kufuneka ifumane imizobo ku-mysite.com/files/Images/myfile. Kuba bekungekho ndlela yokutshintsha ifayile kwindawo yokubamba, bendifuna ukufumana indlela yokwenza oku kwiserver yam. Isisombululo esilula kukwenza imeko yokubhala ngokutsha eyenza ukuba kukhethwe iifayile ezithile.

Nasi isisombululo:

Phinda ubhale kwakhonaCond% {REQUEST_URI}! /? Iifayile / umfanekiso / ifayile1.jpg $
Phinda ubhale kwakhonaCond% {REQUEST_URI}! /? Iifayile / umfanekiso / ifayile2.jpg $
Phinda ubhaleRule ^ ([_ _ 0-9a-zA-Z -] + /)? Iifayile /(.+) wp-kubandakanya / ms-file.php? File = $ 2 [L]

Imiqathango yokubhala kwakhona kufuneka ibekwe ngaphambi komgaqo wokubhala kwakhona, okanye eli qhinga aliyi kusebenza. Kuya kuba lula ukuyiguqula le meko ngeenjongo zakho, ukuba unokuhlangabezana nengxaki efanayo. Isisombululo sisebenze kakuhle kum, sindivumela ukuba ndibeke endaweni yemizobo endaweni yesicatshulwa esingathandekiyo esingahambelani noyilo lwam. Ndiyathemba ukuba izakusebenzela nawe.

Ingaba ucinga ntoni?

Le sayithi isebenzisa i-Akismet ukunciphisa ugaxekile. Funda indlela idatha yakho yokubhaliweyo isetyenziswe ngayo.