Chiwonetsero Chatsopano Cha Domain (Regex) Chimawongolera Mu WordPress

Regex - Mawu Okhazikika

Kwa masabata angapo apitawa, takhala tikuthandiza kasitomala kuti asamuke movutikira ndi WordPress. Wogulayo anali ndi zinthu ziwiri, zonsezi zomwe zakhala zikudziwika mpaka kufika pogawa mabizinesi, chizindikiritso, ndi zomwe zili mgawoli. Ndi ntchito yokhayokha!

Madera omwe adakhalapo akukhalabe, koma malo atsopanowa azikhala ndi zonse zomwe zingagulitsidwe… kuchokera pazithunzi, zolemba, zofufuza, zotsitsa, mitundu, chidziwitso, ndi zina zambiri. Sindikuphonya chinthu chimodzi.

Tikakhala ndi tsamba latsopanoli ndikugwira ntchito, nthawi yokoka lophimba ndikuyiyika moyo inali itakwana. Izi zikutanthauza kuti maulalo aliwonse ochokera kutsamba loyamba la malonda awa amayenera kutumizidwa kumalo atsopano. Tidasunga njira zambiri zogwirizana pakati pamasamba, chinsinsi chake chinali kukhazikitsa owongolera moyenera.

Onetsani Mapulagini mu WordPress

Pali mapulagini awiri otchuka omwe amagwira ntchito yayikulu yosamalira kuwongolera ndi WordPress:

  • Kuwomboledwa - mwina pulojekiti yabwino kwambiri pamsika, yokhala ndi kuthekera kwanthawi zonse komanso magulu owongolera mayendedwe anu.
  • Udindo SEO - pulogalamu yowonjezera iyi ya SEO ndi mpweya wabwino ndipo imandipanga mndandanda wanga Mapulagini Opambana a WordPress pamsika. Imatumizanso ngati gawo la zopereka zake ndipo imatumizanso zowunikira za Redirection ngati mungasamukireko.

Ngati mukugwiritsa ntchito injini yosungidwa ya WordPress ngati WPEngine, Ali ndi gawo loti lithandizire kuwongolera munthuyo asanagunde tsamba lanu ... chinthu chabwino kwambiri chomwe chitha kuchepetsa kuchepa komanso kupitilira pakuwongolera kwanu.

Ndipo, zachidziwikire, mutha lembani malamulo ku fayilo yanu ya .htaccess pa seva yanu ya WordPress… koma sindingalimbikitse. Ndiwe cholakwika chimodzi mwamasulidwe kuti tsamba lanu lisapezeke!

Momwe Mungapangire Regex Redirect

Mu chitsanzo chomwe ndapereka pamwambapa, zitha kuwoneka ngati zophweka kungochita zochotsera kuchokera pachikwama chaching'ono kupita ku domain yatsopano ndi subfolder:

Source: /product-a/
Destination: https://newdomain.com/product-a/

Pali vuto ndi izi, komabe. Bwanji ngati mwagawa maulalo ndi misonkhano yomwe ili ndi funso lofunsira kampeni kapena kutumizidwa? Masamba amenewo sadzapondanso bwino. Mwina ulalo ndi:

https://existingdomain.com/product-a/?utm_source=newsletter

Chifukwa mudalemba ndendende, ulalowo sudzapitanso kulikonse! Chifukwa chake, mutha kuyesedwa kuti mupange chiwonetsero chokhazikika ndikuwonjezera wildcard ku URL:

Source: /product-a/(.*)
Destination: https://newdomain.com/product-a/

Ndizabwino kwambiri, komabe pali mavuto angapo. Choyamba, ikugwirizana ndi ulalo uliwonse ndi / mankhwala-a / mmenemo ndi kuwatumiza onse kumalo omwewo. Chifukwa chake njira zonsezi zidzapita komweko.

https://existingdomain.com/product-a/
https://existingdomain.com/help/product-a/
https://existingdomain.com/category/parent/product-a/

Mawu okhazikika ndi chida chokongola, komabe. Choyamba, mutha kusintha gwero lanu kuti muwonetsetse kuti fodayo ikudziwika.

Source: ^/product-a/(.*)
Destination: https://newdomain.com/product-a/

Izi zitsimikizira kuti foda yoyamba yokha ndiyomwe idzayendetse bwino. Tsopano pavuto lachiwiri… mungapeze bwanji zidziwitso za querystring zomwe zajambulidwa patsamba latsopano ngati kuwongolera kwanu sikukuphatikiza? Kuyankhula pafupipafupi kuli ndi yankho labwino kwa izi:

Source: ^/product-a/(.*)
Destination: https://newdomain.com/product-a/$1

Zambiri zakutchire zimagwidwa ndikusinthidwa komwe mukupita pogwiritsa ntchito zosinthika. Kotero…

https://existingdomain.com/product-a/?utm_source=newsletter

Adzatumiza bwino ku:

https://newdomain.com/product-a/?utm_source=newsletter

Kumbukirani kuti wildcard imathandizira kuti chikwatu chilichonse chikhalenso chowongolera, chifukwa chake izi zithandizanso:

https://existingdomain.com/product-a/features/?utm_source=newsletter

Adzatumiza ku:

https://newdomain.com/product-a/features/?utm_source=newsletter

Zachidziwikire, kuyankhula pafupipafupi kumatha kukhala kovuta kwambiri kuposa izi… koma ndimangofuna ndikupatseni zitsanzo mwachangu momwe mungakhazikitsirere reardx ya redcard yomwe imadutsa zonse mosamala kupita ku dambwe latsopano!

Mukuganiza chiyani?

Tsambali likugwiritsa ntchito Akismet kuchepetsa spam. Phunzirani momwe deta yanu ikufotokozera.