Navigation

    Lanka Developers Community

    Lanka Developers

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Shop

    php seo friendly url

    Web Development
    php html htaccess javascript web application
    2
    12
    293
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Nubelle
      Nubelle Web Development @kasun viduranga last edited by

      @kasun-viduranga math ohoma ekk awa menna meka help weida kiyala balana bro

      public function slugGenerate($title, $location ,$company, $category, $type ) {
              
              // replace non letter or digits by -
               $text = preg_replace('~[^\\pL\d]+~u', '-',$title.'-'.$location.'-'.$company.'-'.$category.'-'.$type);
              
               // trim
               $text = trim($text, '-');
              
               // transliterate
               $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);
      
               // lowercase
               $text = strtolower($text);
      
               // remove unwanted characters
               $text = preg_replace('~[^-\w]+~', '', $text);
      
               if (empty($text))
               {
                 return 'n-a';
               }
               
               return $text;
               
         }
      
      kasun viduranga 1 Reply Last reply Reply Quote 1
      • kasun viduranga
        kasun viduranga @Nubelle last edited by kasun viduranga

        @Nubelle iconv('utf-8', 'us-ascii//TRANSLIT', $text); eka vada na ne, thava strtolower($text); එකෙන් lowercase උනහම සිංහල unicode වැඩ නෑ. පුලුවන්නම් help එකක් දෙන්න.

        Nubelle 1 Reply Last reply Reply Quote 0
        • Nubelle
          Nubelle Web Development @kasun viduranga last edited by

          @kasun-viduranga ehenm bro , manual tama slug eka hdanna wenne . math otana hira una. passe man url eka manual hadagaththa .

          kasun viduranga 1 Reply Last reply Reply Quote 0
          • kasun viduranga
            kasun viduranga @Nubelle last edited by kasun viduranga

            @Nubelle oya dannavada url eken remove karala evata replace karanna oni monavda kiyala. dannavanm kiyanna

            Nubelle 1 Reply Last reply Reply Quote 0
            • Nubelle
              Nubelle Web Development @kasun viduranga last edited by

              @kasun-viduranga man haduwa eke , man danme mehema
              newsid/newscategory/newstitle/

              man hadapu code eka tibba , man balala ewannam

              1 Reply Last reply Reply Quote 0
              • Nubelle
                Nubelle Web Development last edited by

                oya header eke utf-8 dalada tiyene

                kasun viduranga 1 Reply Last reply Reply Quote 0
                • kasun viduranga
                  kasun viduranga @Nubelle last edited by

                  @Nubelle <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> මෙහෙම නේද? මෙක දාල තියෙන්නෙ

                  Nubelle 1 Reply Last reply Reply Quote 0
                  • Nubelle
                    Nubelle Web Development @kasun viduranga last edited by

                    @kasun-viduranga ow bro ,

                    Nubelle 1 Reply Last reply Reply Quote 0
                    • Nubelle
                      Nubelle Web Development @Nubelle last edited by

                      @Nubelle 23164c26-fdc3-4adc-929c-a6eb0f097313-image.png

                      me tiyene man hadapu eka

                      kasun viduranga 1 Reply Last reply Reply Quote 0
                      • kasun viduranga
                        kasun viduranga @Nubelle last edited by

                        @Nubelle puluwannam code eka denna

                        Nubelle 1 Reply Last reply Reply Quote 0
                        • Nubelle
                          Nubelle Web Development @kasun viduranga last edited by

                          @kasun-viduranga edapn inbox karanam

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post

                          2
                          Online

                          1.9k
                          Users

                          941
                          Topics

                          4.8k
                          Posts

                          • Privacy
                          • Terms & Conditions
                          • Donate
                          • Contact Us

                          © Copyrights and All right reserved Lanka Developers Community

                          Sponsored by Axis Technologies (PVT) Ltd

                          Made with in Sri Lanka

                          | |