Wildcard DNS da Dynamic Subdomains

A duk lokacinda na kebe (ha!), Na kasance ina aikin kunsa shi Tsuntsayen Tsuntsaye Mara Tasiri aikace-aikace tare da aikace-aikacen kasuwanci wanda zai ba mutane damar tsara maƙerin mai shagon su. Softwareirƙira Software na na kaina azaman Sabis ɗin Sabis ya kasance babban buri na na ɗan fewan shekaru, kuma wannan babbar dama ce.

Akwai manyan abubuwa guda biyu daga kan shiryayyen da nake son sakawa a cikin aikace-aikacen da suke zama babban ƙalubale don haka ina so in tattauna su a yayin da kuke ƙoƙarin yin hakan. Duk siffofin nan suna gama gari a duk aikace-aikacen, amma na zo gano cewa kodayake sun kasance sanannu ne, yawancin masu ba da sabis ba sa tallafa musu a zahiri!

Manufata ita ce gina aikace-aikacen son kai inda abokin harka zai iya tsara configan yankinsu (http://Reshen yanki.myapplicationdomain.com), ko ma yi amfani da nasu subdomain (http://Reshen yanki.kurdomain.com). Domin ya zama sabis na kai, yana buƙatar ikon shirya mafita - amma yana samun dama ga wasu fayilolin sanyi na sabar uwar garken waɗanda basu da iyaka tare da yawancin asusun tallatawa! Batun shine goyon baya ga Wildcard DNS, ma'ana, don iya nuna duk wani yanki zuwa yankin sabar. A takaice dai, test.domain.com ko www.domain.com ko wani.domain.com duk suna nuna wuri ɗaya. Komai abin da kuka rubuta - zai yi aiki.

A waje da aikace-aikace, wannan ainihin kyakkyawan fasalin da ya kunna - har ma a shafinka. Zai baiwa kowa damar rubutawa wani abu.kurdomain.com kuma kawo su yourdomain.com. Za ka yi mamakin irin munanan hanyoyin da ke akwai wadanda ke nuna shafin ka ko gidan yanar gizo. Wannan zai iya ɓacewa idan mutum bai gane cewa kuskure ne tare da mahaɗin ba.

Tsarin yana aiki ta hanyar sake sake rubuta Reshen yanki zuwa wani yanki kafin shafin yanar gizo ya fito daga shafin yanar gizo ta hanyar yanar gizo… don haka subdomain.domain.com a zahiri ana samun fassarar saitunan Apache kamar yadda domain.com?what=subdomain ta hanyar amfani da fayil na htaccess:

# Cire sashin yanki na yankin.com
Sake rubutawa ondaya% {HTTP_HOST} ^ ([^ \.] +) \ .Nakasance \ .com $ [NC]
 
# Bincika cewa sashin yanki ba www da ftp da mail bane
Sake sake rubutaCond% 1! ^ (Www | ftp | mail) $ [NC]
 
# Canza duk buƙatun zuwa rubutun php yana wucewa azaman takaddar Reshen yanki
Sake RubutaRule ^. * $ Http://www.yourdomain.com/%1 [R, L]

Akwai wasu ƙarin bayanai kan fayilolin da kuke buƙatar gyara a V-nessa.net. Lura cewa fayilolin bazai kasance a inda aka ƙayyade ba dangane da mai ba da sabis ɗin ku. Mai ba da sabis na mai ba da tallafi yana taimaka wa masu shiga tsakani, amma sun yi gargaɗi cewa yin hakan na iya ɓata tallafin abokin ciniki. Har ila yau, 'hack a kan haɗarinku', ba za su isa su taimake ku ba, ko dai.

Zan yi aiki kan bunkasa sauran aikace-aikacen maimakon a rataya kan ci gaban yankin. Gaskiya zan bayar CakePHP harbi don amfani dashi azaman tsari don shi!

Bayanin ƙarshe, Ba ni ɗan ɓatarwa a kan wannan abubuwan. Na yi albarka tare da ƙungiyoyin ci gaba a aikina don gano wannan abubuwan. Ni kadai, Ina ɗan haɗari. Duk wani martani da taimako ana yabawa!

3 Comments

  1. 1

    Yayi sanyi. A zahiri nayi amfani da sabar sunan mai rejista tare da DNS dinta yayin da nake tare da SliceHost, kuma an saita Apache don hidimtawa ƙananan yankuna daga fayilolin yankuna na yau da kullun.

    Nayi matukar sha'awar duba tsarin CakePHP, amma hanyar haɗin yanar gizonku ta mutu 🙂

    Ana iya samun CakePHP a http://cakephp.ORG

  2. 3

Me kuke tunani?

Wannan shafin yana amfani da Akismet don rage spam. Koyi yadda aka sarrafa bayanan bayaninka.