nemakuphp Posted July 18, 2010 Report Share Posted July 18, 2010 Ir sekojošs .htaccess fails RewriteEngine On RewriteBase /dir/ RewriteRule ^fails$ fails.php [L] RewriteRule ^fails/$ fails.php [L] RewriteRule ^fails/([a-zA-Z0-9]*)$ fails.php?page=$1 [L] RewriteRule ^fails/([a-zA-Z0-9]*)/$ fails.php?page=$1 [L] Problēma ir tāda, ka ejot uz http://host/dir/fails/lapa netiek piešķirta vērtība $_GET['page'], līdz ar to nevar veikt tālākās operācijas. Cerams, ka spēsiet palīdzēt. Link to comment Share on other sites More sharing options...
nemakuphp Posted July 19, 2010 Author Report Share Posted July 19, 2010 Tiešām neviens nevar palīdzēt? Link to comment Share on other sites More sharing options...
indoom Posted July 19, 2010 Report Share Posted July 19, 2010 pamēģini nomainīt rulēs ^fails uz ^dir/fails Link to comment Share on other sites More sharing options...
nemakuphp Posted July 19, 2010 Author Report Share Posted July 19, 2010 (edited) Nekas nemainās. Reāli, ja es pieprasu http://host/dir/fails, tad viņš atver http://host/dir/fails.php. Ja pieprasu http://host/dir/fails/lapa, tad viņš tāpat atver http://host/dir/fails.php, nezinu, vai vispār ?page=lapa tiek iekļauts. Vismaz print_r($_GET); neko neuzrādīja Edited July 19, 2010 by nemakuphp Link to comment Share on other sites More sharing options...
briedis Posted July 19, 2010 Report Share Posted July 19, 2010 Pamēģini: RewriteBase /dir (bez pēdējā slaša) Link to comment Share on other sites More sharing options...
nemakuphp Posted July 19, 2010 Author Report Share Posted July 19, 2010 Tāpat nestrādā Pat ierakstot ar roku šādu rule RewriteRule ^fails/lapa$ fails.php?page=lapa [L] RewriteRule ^fails/lapa/$ fails.php?page=lapa [L] netiek piešķirta $_GET vērtība Link to comment Share on other sites More sharing options...
briedis Posted July 19, 2010 Report Share Posted July 19, 2010 Tev nav kāds cits htaccess ar modrewrite direktoriju augstāk, kas neļauj tikt šitam klāt? Link to comment Share on other sites More sharing options...
nemakuphp Posted July 19, 2010 Author Report Share Posted July 19, 2010 Citu .htaccess nav, bet nu paeksperimentēju, un tiku tik tālu, ka ja pārraksta no http://host/dir/fails/lapa uz http://host/dir/fails.php?page=lapa, tad nestrādā, bet ja pārraksta piemēram no http://host/dir/nosaukumssavadaksnekaphpfailam/lapa uz http://host/dir/fails.php?page=lapa, tad viss strādā. Tātad, tagad problēma tāda, kā panākt, lai darbojas arī no http://host/dir/fails/lapa uz http://host/dir/fails.php?page=lapa Link to comment Share on other sites More sharing options...
nemakuphp Posted July 19, 2010 Author Report Share Posted July 19, 2010 Parakājos vēlreiz google ar jauno problēmu un atradu risinājumu. Pie vainas bija MultiViews. Iekš .htaccess pieliku rindiņu Options -MultiViews un visi rules aizgāja. Paldies visiem, kuri centās palīdzēt Link to comment Share on other sites More sharing options...
Recommended Posts