Yuav Ua Li Cas Ncaj Qha Kev Lag Luam

Cov txheej txheem:

Yuav Ua Li Cas Ncaj Qha Kev Lag Luam
Yuav Ua Li Cas Ncaj Qha Kev Lag Luam

Video: Yuav Ua Li Cas Ncaj Qha Kev Lag Luam

Video: Yuav Ua Li Cas Ncaj Qha Kev Lag Luam
Video: Yuav Nqi Peev Lis Cas Thiaj Lis Zoo Rau Koj Txoj Kev Lag Luam? - By Tayvee lyk 2024, Hlis ntuj nqeg
Anonim

Txhawm rau kev hloov tsheb, qhov yooj yim tshaj yog siv lub peev xwm ntawm Apache web server, lossis theej, siv htaccess file, siv cov kev tswj hwm kev tswj hwm ntawm txhua qhov chaw. Koj tuaj yeem tso cov ntawv qhia kev rau hauv cov ntaub ntawv no, yog tias koj coj lawv tawm, tom qab lub software yuav xa cov neeg siv mus rau lub vev xaib teev hauv cov ntaub ntawv.

Yuav ua li cas cov tsheb khiav ncaj qha
Yuav ua li cas cov tsheb khiav ncaj qha

Cov Lus Qhia

Kauj ruam 1

Ua ntej tshaj, qhib cov ntawv nyeem lub niaj zaus, piv txwv li, "Notepad". Nws lub peev xwm muaj peev xwm los tsim ntaub ntawv htaccess thiab sau nws cov ntsiab lus tsim nyog. Nws muaj cov ntawv qhia kev nyob rau hauv daim ntawv ntawm kab ntawm lub tiaj ntawv uas tuaj yeem kho kom zoo ib yam li cov ntaub ntawv nrog kev tso cai html, txt, js thiab lwm tus.

Kauj ruam 2

Ua raws cov lus qhia txog kev tsheb mus los kom haum koj cov kev xav tau. Yog tias koj xav tau xa kiag li txhua tus neeg siv los ntawm txhua nplooj ntawv ntawm koj lub xaib mus rau qhov chaw nyob qub, tom qab ntawd muab tso rau kab hauv qab no hauv htaccess file: Redirect /

Kauj ruam 3

Hauv cov ntawv nkag no, Redirect kev qhia yog lub chaw hloov pauv. Cov kab laum (ncaj qha ua ntej) ntawm no txhais cov cag npe ntawm cov peev txheej (qhov kev coj ua siv rau kev thov cov ntaub ntawv tsim nyog hauv txhua cov ntaub ntawv xaib). Kev thov rau koj cov peev txheej yuav cuam tshuam tus txheej txheem hloov mus. Tab sis yog tias cov ntawv zoo sib xws nrog lwm cov kev taw qhia tau muab tso rau hauv qee qhov subfolder, ces nws cov lus txib yuav dhau los ua ntej rau Apache. Thiab https://site.ru ntawm no qhia qhov chaw nyob uas tus software software hloov pauv tsheb.

Kauj ruam 4

Hloov chaw hauv paus, koj tuaj yeem hais qhia txhua qhov chaw khaws ntaub ntawv. Tom qab ntawd txoj cai hloov tsheb yuav cuam tshuam rau cov neeg siv uas thov cov ntaub ntawv los ntawm txhua subfolders thiab cov npe uas tau teev tseg. Piv txwv li: Redirect badBoys / https://site.ru. Nws tseem tuaj yeem xa rov qab mus rau qhov chaw nyob uas yuav tsum tau muaj tsuas yog cov neeg caij nthwv dej uas cov browser xa xa mus thov cov ntaub ntawv ntawm qee yam. Lub tshuab no tau nqis tes siv RedirectMatch kev taw qhia, uas siv cov lus qhia tsis tu ncua kom phim cov kev thov tuaj ntawm lub browser: RedirectMatch (. *). Php $ https://site.ru Txuag cov txheej txheem tsim tawm rau cov ntawv hu ua.htaccess, tom qab ntawd upload nws rau lub hauv paus nplaub tshev ntawm koj cov peev txheej.

Pom zoo: