chizijs Posted February 17, 2010 Report Share Posted February 17, 2010 (edited) Problēma ir sekojoša, kad ieeju adresē http://adrese.lv/lapa parada to lapu, bet kad ieeju http://adrese.lv/lapa/ rada, ka lapa netika atrasta? .htacces RewriteEngine On RewriteCond %{REQUEST_FILENAME} -d [OR] RewriteCond %{REQUEST_FILENAME} -f RewriteRule .* - [L] RewriteRule ^(.*)$ index.php?p=$1 [QSA,L] index.php if($_GET['p']) { $fails = "lpp/".$_GET['p'].".php"; if(file_exists($fails)) include $fails; else echo "lapa netika atrasta!"; } else include "lpp/default.php"; Edited February 17, 2010 by chizijs Link to comment Share on other sites More sharing options...
2easy Posted February 17, 2010 Report Share Posted February 17, 2010 (edited) $fails = "lpp/".rtrim($_GET['p'], '/').".php"; Edited February 17, 2010 by 2easy Link to comment Share on other sites More sharing options...
chizijs Posted February 17, 2010 Author Report Share Posted February 17, 2010 Paldies! :) Link to comment Share on other sites More sharing options...
Recommended Posts