Yuav Ua Li Cas Rau Kev Xaib Xaib Mus Rau Lub Xaib

Cov txheej txheem:

Yuav Ua Li Cas Rau Kev Xaib Xaib Mus Rau Lub Xaib
Yuav Ua Li Cas Rau Kev Xaib Xaib Mus Rau Lub Xaib

Video: Yuav Ua Li Cas Rau Kev Xaib Xaib Mus Rau Lub Xaib

Video: Yuav Ua Li Cas Rau Kev Xaib Xaib Mus Rau Lub Xaib
Video: Mus Saib Muam Thoj Lub Neej Thaum Hmoob Mekas Pab Tag Zoo Li Cas 2024, Hlis ntuj nqeg
Anonim

Sau yog tus ntsuj plig ntawm lub xaib. Ib qho chaw zoo-xaiv yog ib qho ntawm cov laj thawj nyob rau hauv cov kev vam meej ntawm cov cuab yeej. Yog li ntawd, qee zaum qee yam haujlwm hauv Is Taws Nem pauv lawv qhov chaw nyob, hloov mus rau qhov chaw tshiab. Tab sis cov neeg siv tseem mus xyuas qhov chaw nyob qub. Thiab qee zaum tus naj npawb ntawm cov kev mus ntsib ntawd yog ib qho tseem ceeb heev. Kev plam tus neeg mloog ntawm cov khoom siv thaum hloov chaw nyob yuav yog qhov ruam xwb. Thiab hauv qhov no, tsis muaj ib yam dab tsi los ua tab sis rov qab los ntawm kev xaib mus rau qhov chaw.

Yuav ua li cas rau kev xaib xaib mus rau lub xaib
Yuav ua li cas rau kev xaib xaib mus rau lub xaib

Nws yog qhov tsim nyog

Lub vev xaib siv los ntawm Apache server. Server teeb tsa tso cai rau cov ntaub ntawv.htaccess. Nquag module mod_rewrite. Qhov kev pabcuam FTP. Cov ntaub ntawv rau kev nkag mus rau cov neeg rau zaub mov ntawm FTP

Cov Lus Qhia

Kauj ruam 1

Txuas rau lub xaib site siv qhov kev pabcuam FTP siv. Qhov no yuav tsum yog tus neeg rau zaub mov hosting ntawm qhov chaw uas kev hloov kho yuav ua. Cov ntaub ntawv nkag mus FTP feem ntau yog tshaj tawm ntawm lub tuam txhab hosting lub vev xaib lossis hauv cov tswj hwm hosting.

Kauj ruam 2

Rub tawm.htaccess ntawv los ntawm lub hauv paus xaib rau koj lub hard drive. Yog tias.htaccess cov ntaub ntawv tsis pom nyob rau hauv cov hauv paus hauv paus, xyuas cov xwm txheej ntawm cov ntaub ntawv zais pom cov hom ntawm tus neeg rau zaub mov. Yog tias hom yog neeg xiam oob khab, pab nws thiab hloov kho cov npe FTP. Yog tias koj tseem tsis tuaj yeem pom cov ntaub ntawv, tsuas yog tsim ib kab ntawv hu ua.htaccess ntawm koj lub hard drive.

Kauj ruam 3

Qhib.htaccess cov ntaub ntawv nyob ntawm koj lub hard drive hauv phau ntawv kho. Nws yuav tsum yog cov ntawv nyeem lub tiaj, uas yog, ntawv tsis muaj sau ntawv. Nws yuav tsum muaj peev xwm txuag tau cov ntawv hauv ib qho-byte encoding sib dhos nrog latin-1 encoding.

Kauj ruam 4

Kho kom raug koj cov ntaub ntawv.htaccess. Yog tias koj xav tau hloov txhua tus neeg siv los ntawm txhua qhov url sab hauv lub xaib mus rau ib qhov url ntawm lwm tus xaib, nkag rau cov kab hauv qab no thaum pib ntawm.htaccess cov ntaub ntawv: RewriteEngine rau

Rov sau dua tshiab ^ [L, R = 301] Ntawm no, es tsis txhob sau npe, koj yuav tsum sau qhov chaw nyob uas tus ntawv pauv yuav qhov chaw. Piv txwv, nws yuav zoo li qhov no: RewriteEngine ntawm

Rov RovqabRule ^ https://codeguru.ru/ [L, R = 301] Yog tias koj xav tau hloov pauv ntawm ntau lub vev xaib mus rau qhov zoo ib yam li urls ntawm lwm lub xaib (piv txwv li, thaum hloov chaw xaib), tom qab ntawd ntxiv cov kab hauv qab no kom pib.htaccess ntawv: RewriteEngine ra

RewriteRule ^ https://% {REQUEST_URI} [L, R = 301] Piv txwv, nws zoo li qhov no: RewriteEngine rau

Rov Sau Dua Tshiab ^ https://codeguru.ru% {REQUEST_URI} [L, R = 301] Khaws cov ntaub ntawv.htaccess.

Kauj ruam 5

Luam tawm cov ntaub ntawv.htaccess rau koj lub npe hauv paus xaib. Siv cov program FTP. Yog tias.htaccess ntawv twb tshwm sim hauv phau ntawv no, sau nws.

Kauj Ruam 6

Tshawb xyuas seb kev xa mus ua haujlwm li cas. Qhib hauv qhov browser txhua qhov chaw nyob ntawm lub xaib los ntawm kev kho dua tshiab yuav tsum ua. Yog tias txhua yam ua haujlwm zoo, qhov browser yuav xa ncaj qha rau nplooj ntawv los ntawm lwm lub xaib.

Pom zoo: