Flide Posted June 19, 2010 Report Share Posted June 19, 2010 Sveicināti visi, nezināju kur īsti meklēt palīdzību, tpc vēršos pie jums, varbūt arī sadaļa nav īstā, bet nezinu pie kuras valodas tas īsti piederās! Tātad meklēju scriptu kas man pārvedo linku, no manalapa.lv?index.php?page=main uz manalapa.lv/index/page/main Zinu ka tāds ir ..htaccees scripts, bet neviens nesaka kā to dabūt gatavu, bet es arī meklēju citu variantu bez htaccees, neiznbu vai tāds ir, bet tikuntā, jo man serverkstei nepatīk .htaccess, man dc teica ka uz lhttpad nevar lietot .htaccees, neiznu vai tur taisnība, bet doma tāda ka man noderētu linku pārvedošanas scripts :) Paldies jau iepriekš!! Quote Link to comment Share on other sites More sharing options...
Леший Posted June 19, 2010 Report Share Posted June 19, 2010 Tātad meklēju scriptu kas man pārvedo linku, no manalapa.lv?index.php?page=main uz manalapa.lv/index/page/main Zinu ka tāds ir ..htaccees scripts, Parasti htaccess izmanto pretejai darbībai. Tavā gadījumā, vai nu pārveido linku ar kādu preg_replace, vai nnu veido uzreiz tādu, kādu vajag. Quote Link to comment Share on other sites More sharing options...
Flide Posted June 19, 2010 Author Report Share Posted June 19, 2010 (edited) vai nnu veido uzreiz tādu, kādu vajag. kā to saprast? .. ........ un uz kā reāli uzglabājās info par: manalapa.lv/lv/main/ manalapa.lv/rus/main/ manalapa.lv/eng/main/ Nemāku pareizi pateikt, kādā veidā es vienreiz izvēlos lv / rus/ eng / viņš man saglabā.. caur ko tas iet, varbūtās kāds arī ar to varētu palīdzēt.. Edited June 19, 2010 by Flide Quote Link to comment Share on other sites More sharing options...
mefisto Posted June 19, 2010 Report Share Posted June 19, 2010 Nu kaut kā šitā : RewriteEngine On RewriteRule ^([^/]+)?/?([^/]+)?/?$ index.php?lang=$1&page=$2 [L] Quote Link to comment Share on other sites More sharing options...
Pentiums Posted June 19, 2010 Report Share Posted June 19, 2010 nu ja htaccess neder, tad taisi visu pa direktorijām, un katrā direktorijā index failu Quote Link to comment Share on other sites More sharing options...
Flide Posted June 19, 2010 Author Report Share Posted June 19, 2010 bet tad atkal ar include visu laiku janemas, ari nav parak labi un cakars liels. Quote Link to comment Share on other sites More sharing options...
codez Posted June 19, 2010 Report Share Posted June 19, 2010 lasi MVC Quote Link to comment Share on other sites More sharing options...
Flide Posted June 19, 2010 Author Report Share Posted June 19, 2010 lasi MVC kas ir mvc? Quote Link to comment Share on other sites More sharing options...
mefisto Posted June 19, 2010 Report Share Posted June 19, 2010 http://en.wikipedia.org/wiki/Model–view–controller http://php.lv/f/topic/16623-ka-uzrakstit-vienkarsu-mvc-framework-u/ Quote Link to comment Share on other sites More sharing options...
Flide Posted June 19, 2010 Author Report Share Posted June 19, 2010 (edited) Paldies, betir arī kāda iespēja bez .htaccess? un kāds var pateikt kā uztaisīt vairākas valodas, piemēram latvišu un angļu, lai save iekš cocies bez lietotājiem, ar lietotājiem sanāk bet savādāk nē. edit: es itka valodas uztaisiju, tikai man visu parada kajam gaisa.. <li><a href="#"><?php echo $menu_tops;?></a></li> <li><a href="#"><?php echo $menu_wasnd;?></a></li> <li><a href="#"><?php echo $menu_gaming;?></a></li> <li><a href="#"><?php echo $menu_site;?></a></li> <li><a href="#"><?php echo $menu_home;?></a></li> radas: home | site | gaming | wasnd | tops un deļ tā nevaru turpināt, jo man news iet: $news_language = include ("page/news_eng.php"); $news_language = include ("page/news_rus.php"); $news_language = include ("page/news_lv.php"); --- bet ja man viss iet atžgārni, neko nesaprotu!| Kā to labot..? Edited June 19, 2010 by Flide Quote Link to comment Share on other sites More sharing options...
codez Posted June 19, 2010 Report Share Posted June 19, 2010 Kāpēc tev neder .htaccess? Quote Link to comment Share on other sites More sharing options...
Flide Posted June 19, 2010 Author Report Share Posted June 19, 2010 man ir lighttpd Quote Link to comment Share on other sites More sharing options...
codez Posted June 19, 2010 Report Share Posted June 19, 2010 te Quote Link to comment Share on other sites More sharing options...
Nils Graustiņš Posted August 12, 2012 Report Share Posted August 12, 2012 (edited) //sashķeļam pieprasīto adresi pēc `/`; $_url_parts= explode('/',$_SERVER['REQUEST_URI']; // Tad domājam, kur katru daļu likt: $_language = current($_url_parts); // lv $_item = end($_url_parts); // Edited August 12, 2012 by Nils Graustiņš Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.