Lord Posted April 3, 2011 Report Share Posted April 3, 2011 Sveiki! Mans .htaccess fails ir ar saturu Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^archive/([0-9]+)/([0-9]+)$ index.php?year=$1&month=$2 [NC,L] Taču, ejot http://adrese.lv/archive/2010/01, izmet "No input file specified.". Kur varētu būt problēma? Quote Link to comment Share on other sites More sharing options...
briedis Posted April 3, 2011 Report Share Posted April 3, 2011 Pamēģini aizvākt to RewriteBase rindu... Quote Link to comment Share on other sites More sharing options...
Lord Posted April 3, 2011 Author Report Share Posted April 3, 2011 Pamēģini aizvākt to RewriteBase rindu... Nelīdz. Reāli man ir šāds .htaccess: Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^article/([0-9]+)/(.*)$ index.php?article=$1 [NC,L] RewriteRule ^archive/([0-9]+)/([0-9]+)$ index.php?year=$1&month=$2 [NC,L] Pirmais nosacījums strādā, tā kā ar pašu konfigurāciju droši vien ir jābūt visam kārtībā. Droši vien kaut kas otrajam RewriteRule nav pareizi. Quote Link to comment Share on other sites More sharing options...
Val Posted April 3, 2011 Report Share Posted April 3, 2011 Apmēram tā. RewriteRule ^article/([0-9]+)/?$ index.php?article=$1 [NC,L] RewriteRule ^archive/([0-9]+)/([0-9]+)/?$ index.php?year=$1&month=$2 [NC,L] Quote Link to comment Share on other sites More sharing options...
Lord Posted April 3, 2011 Author Report Share Posted April 3, 2011 Apmēram tā. RewriteRule ^article/([0-9]+)/?$ index.php?article=$1 [NC,L] RewriteRule ^archive/([0-9]+)/([0-9]+)/?$ index.php?year=$1&month=$2 [NC,L] Article strādā, taču pie archive gan ar adrese.lv/archive/2010/01 , gan ar adrese.lv/archive/2010/01/ izmet to pašu No input file specified. Quote Link to comment Share on other sites More sharing options...
Val Posted April 3, 2011 Report Share Posted April 3, 2011 (edited) Esi tik pārliecināts, ka problēma nav citur? Iemet koda sākumā kaut vai print_r($_GET); un ieraudzīsi, ka rewriterule strādā. Array ( [year] => 2010 [month] => 01 ) Droši vien pats esi jau sapratis, ka pašlaik archive un article iekš $_GET masīva nemaz nav un nevar būt. Edited April 3, 2011 by Val Quote Link to comment Share on other sites More sharing options...
Lord Posted April 3, 2011 Author Report Share Posted April 3, 2011 Esi tik pārliecināts, ka problēma nav citur? Iemet koda sākumā kaut vai print_r($_GET); un ieraudzīsi, ka rewriterule strādā. Array ( [year] => 2010 [month] => 01 ) Droši vien pats esi jau sapratis, ka pašlaik archive un article iekš $_GET masīva nemaz nav un nevar būt. Problēma pavisam noteikti ir ar .htaccess. Nemaz nav iespējas neko printēt no GETiem. Lapa vienkārši neparādās, tiek izmesta balta lapa ar vienu vienīgu uzrakstu "No input file specified.", ne HTML, ne PHP netiek apskatīti vispār. Quote Link to comment Share on other sites More sharing options...
Lord Posted April 3, 2011 Author Report Share Posted April 3, 2011 Izdevās atrisināt, pievienojot Options -MultiViews :). Paldies visiem, kas atbildēja! 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.