WordPress Cov Cai muaj Cov Kev Zam, ib yam nkaus

wordpress apache

wordpress apacheWordPress ua qhov tseem ceeb hloov tshiab rau hauv lub vev xaib blogging, txav nws mus ze rau cov txheej txheem kev tswj hwm cov ntsiab lus nrog kev rov qab taug qab, ntau dua kev txhawb nqa rau cov tub luam kev cai, thiab feature qhov tseem ceeb tshaj plaws rau kuv – ntau lub vev xaib txhawb nrog sau daim phiaj.

Yog tias koj tsis yog lub ntsiab lus tswj qhov system junkie, nws zoo. Koj tuaj yeem hla txoj cai dhau los ntawm cov tshooj no. Tab sis rau kuv cov phooj ywg techno-geeks, code-hau thiab apache-dabblers, Kuv xav qhia ib yam dab tsi uas txaus nyiam, thiab qee yam txias.

Ntau lub vev xaib yog qhov ua haujlwm uas tso cai rau koj khiav txhua cov vev xaib ntawm WordPress nrog ib qho kev teeb tsa WordPress. Yog tias koj tswj hwm ntau qhov chaw, nws zoo nkauj vim tias koj tuaj yeem nruab ib pawg pom zoo ntawm cov ntxhais thiab cov widget, thiab ua rau lawv rau koj cov chaw siv. Muaj ob peb qho laj thawj kev qhia chaw rau koj thaj chaw, tab sis cov txheej txheem tsis yooj yim.

Ib qho ntawm cov teeb meem thaj chaw kuv teev yog nyob rau hauv cov ntsiab lus customization. Vim tias cov ntsiab lus tuaj yeem ua kom muaj ntau lub vev xaib, txhua qhov kev tsim kho koj ua rau lub ntsiab lus tseem yuav cuam tshuam lwm qhov chaw siv cov ntsiab lus ntawm koj lub vev xaib ntau. Kuv txoj kev nyob ib ncig ntawm no yog theej tawm cov ntsiab lus ua ntej kuv pib kev kho, thiab qhia meej lub npe rau cov neeg siv khoom xaib Kuv tabtom styling rau.

Lwm qhov teeb meem nthuav dav yog qhov tshwm sim hauv cov ntawv .htaccess ntawm koj tus Apache server. WordPress yuav tsum tau rov sau txoj kev ntawm qhov blog-ntawm-blog thiab ua li no nrog qhov rov sau dua txoj cai thiab php ntaub ntawv.

WordPress siv txoj cai rov sau dua cov hauv qab no:

Rov sau ua dua ^ ([_ 0-9a-zA-Z -] + /)? Files /(.+) wp- suav / ms-files.php? File = $ 2 [L]

Qhov tseem ceeb, txhua yam uas yog nyob rau hauv subdirectory ntawm mysite.com/files/directory tau sau dua tshiab rau mysite.com/files/wp-includes/myblogfolderpath… thiab qhov no yog qhov uas nws tau txais nthuav. Yuav ua li cas yog tias koj xav tau muaj cov ntaub ntawv ntawm koj lub server uas yog mysite.com/files/myfolder/myimage.jpg? Koj tau 404 qhov yuam kev, qhov ntawd tshwm sim. The Apache rov sau txoj cai rov qab los rau hauv thiab pauv txoj kev.

Tso cai, koj yuav tsis tuaj hla qhov teeb meem no, tab sis kuv tau ua. Kuv muaj lub vev xaib uas xav tau siv javascript widget los ntawm lwm lub vev xaib, thiab nws xav tau nrhiav cov duab ntawm mysite.com/files/Images/myfile. Vim tias tsis muaj txoj hauv kev los hloov cov ntawv ntawm lub vev xaib, Kuv xav tau txoj kev los mus ua qhov no ntawm kuv lub server. Cov kev daws teebmeem yooj yim yog tsim kom tau sau ntawv rov qab uas ua rau muaj kev zam rau cov ntaub ntawv tshwj xeeb.

Ntawm no yog cov tshuaj:

Rov sau dua tshiabCond% {REQUEST_URI}! /? Files / Image / file1.jpg $
Rov sau dua tshiabCond% {REQUEST_URI}! /? Files / Image / file2.jpg $
Rov sau ua dua ^ ([_ 0-9a-zA-Z -] + /)? Files /(.+) wp- suav / ms-files.php? File = $ 2 [L]

Qhov rov sau ua ntej yuav tsum tau muab tso ua ntej txoj cai rov sau dua, lossis qhov kev dag no yuav tsis ua haujlwm. Nws yuav tsum yooj yim los hloov cov kev mob no rau koj tus kheej lub hom phiaj, koj puas yuav ntsib teeb meem zoo sib xws. Cov kev daws teeb meem tau ua haujlwm zoo rau kuv, uas cia kuv hloov daim duab kev cai zoo dua li tsis siv cov ntawv nyeem tsawg dua uas tsis haum rau kuv tus qauv. Vam tias, nws yuav ua haujlwm rau koj thiab.

Yuav ua li cas koj xav hais tias?

Qhov Web site no siv Akismet los txo cov kev pabcuam. Kawm li cas koj cov ntaub ntawv tawm tswv yim tiav.