ඔබේ බ්ලොග් අඩවිය Country-Specific URLs වලට redirect වීම වලක්වා ගන්නා හැටි.

7:34 AM
සාමාන්‍යයෙන් blogger blog අඩවි තමන්ගේ ප්‍රේක්ශකයෝ එන රටවල් වල හැටියට තමන්ගේ url එක වෙනස් කරනවා.උදාහරණයක් හැටියට අපි හිතමු අපේ බ්ලොග් අඩවියේ url එක softwarelanthaya.blogspot.com කියලා ඒත් ඉන්දියාවෙ කෙනෙක් අපේ බ්ලොග් අඩවියට ආවොත් එයා එන්නෙ softwarelanthaya.blogspot.in කියන URL එක හරහා .මේ වගේ පහත දක්වා තියෙන හැම රටකටම අනුව අපේ blog අඩවියේ URL එක වෙනස් වෙනවා.

India [blogspot.in], Australia [blogspot.com.au], UK [blogspot.co.uk], Japan [blogspot.jp], New Zealand [blogspot.co.nz], Canada [blogspot.ca], Germany [blogspot.de], Italy [blogspot.it], France [blogspot.fr], Sweden [blogspot.se], Spain [blogspot.com.es], Portugal [blogspot.pt], Brazil [blogspot.com.br], Argentina [blogspot.com.ar], Mexico [blogspot.mx]


අපි බලමු මෙහෙම URL එක වෙනස් වෙන එකෙන් අපිට වෙන අවාසි මොනවද කියලා.

  1. අපි අපේ බ්ලොග් අඩවියට facebook,disqus වගේ comment system එකක් දාලා තිබුනොත් ඒකෙ ගැටලු මතු වෙන්න පුලුවන්.
  2. එකින් එක විසිටර්ස්ලට URL වෙන වෙන නිඋසා facebook likes,G+,tweets අඩුවෙන්න පුලුවන්.
  3. ඒ වගේ මේ එක එක URL වලින් එන traffic නිසි පරිදි ගණනය නොවෙන්නත් පුලුවන්.

මේක කොහොමද හදාගන්නෙ?

ඉතා පහසු වැඩක් කරන්න තියෙන්නෙ.මම පහලින් දාලා තියන codes ටික ඔයාගෙ බ්ලොග් එකේ template>edit HTML ගිහින් <head> tag එකට යටින් දාගෙන save කරන්න.

<script type="text/javascript">

      /* Get the full URL of the current blogger page */
      var blog = document.location.href.toLowerCase();

      /* Do not redirect if the domain is .com already */
      if (!blog.match(/\.blogspot\.com/)) {

        /* Replace the country TLD with .com and ncr switch */
        blog = blog.replace(/\.blogspot\..*?\//, ".blogspot.com/ncr/");

        /* Open the new URL in the current tab */
        windows.location.replace(blog);

      }

    </script>
දැන් ඔයාලගෙ බ්ලොග් එකට එනා සෑම visitor කෙනෙක්ම එන්නෙ blogspot.com URL එක හරහා :)

මේ වගේ ලිපියකින් නැවතත් හමුවෙමු!!

Share this

Related Posts

Previous
Next Post »

23 comments

Write comments
May 15, 2015 at 2:05 PM delete

thanks මල්ලි කමෙන්ට් එකට :) ප්‍රයෝජනවත් වුණා කියල හිතනවා :)

Reply
avatar
May 16, 2015 at 8:06 PM delete

ස්තුතියි...

ගොඩක් වටින ලිපියක්

Reply
avatar
May 17, 2015 at 6:42 AM delete

ප්‍රයෝජනවත් වුනානම් ගොඩක් සතුටුයි සහෝ :)

Reply
avatar
January 26, 2016 at 2:27 PM delete

තැන්ක්ස් මචං niyamayi thava hoda post dapan සහෝ

Reply
avatar
January 26, 2016 at 2:28 PM delete

තැන්ක්ස් මචං niyamayi thava hoda post dapan සහෝ

Reply
avatar
January 26, 2016 at 7:27 PM delete

අනිව මචන් :)

Reply
avatar
February 2, 2016 at 9:19 PM delete

මචං මගේ බ්ලොග් එකෙන් මේ බ්ලොග් එකට සබැදුමක් දීල තියෙන්නේ උබේ එකෙනුත් සබැදුමක් දීල පොඩි සප්පෙකක් දීපන් මචෝ මෙන්න එකට යන පාරhttp://topnetsystem.blogspot.com/p/blog-page_31.html#.VrBQKdJ97Dc/

Reply
avatar
February 3, 2016 at 3:32 PM delete

අනිවා මචන් සප් එකක් දෙන්නම්

Reply
avatar
February 3, 2016 at 11:46 PM delete

මගේ බ්ලොග් එක බැලුවද බ්ලොග් අඩවි කියන පිටුව හොයා ගන්න පුළුවන් උනාද මචෝ

Reply
avatar
February 4, 2016 at 7:36 AM delete

ඔයාගෙ බ්ලොග් එකේ බැනර් එකක් දෙන්න පුලුවන්ද මට ඇඩ් කරන්න?

Reply
avatar
February 7, 2016 at 8:36 PM delete

මේකට දෙන්න බා කොල්ලෝ ඔයාගේ email එක දෙන්නකෝ එකට එවන්නම්

Reply
avatar
February 7, 2016 at 8:37 PM delete

comment එකක් විදියට දෙන්න බැ නේ erro කියනවා

Reply
avatar
February 7, 2016 at 8:37 PM delete

comment එකක් විදියට දෙන්න බැ නේ erro කියනවා

Reply
avatar
August 13, 2016 at 9:11 PM delete

වැඩේ නම් කළා
ඒක හරිනම ඔයා supper

Reply
avatar
August 13, 2016 at 9:11 PM delete

වැඩේ නම් කළා
ඒක හරිනම ඔයා supper

Reply
avatar

ඔයාලගේ අදහස් උදහස් තමයි අපිව දිරිගන්වන්නෙ෴ EmoticonEmoticon