nemakuphp Posted March 3, 2010 Report Share Posted March 3, 2010 (edited) Lieta sekojoša, ir šāds .htaccess fails RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^kkas/(.*)$ kkas.php?id=$1 [L,QSA] Ir fails /root/sub_dir/kkas.php .htaccess atrodas /root/sub_dir/ Ieejot http://domain.tld/sub_dir/kkas/123 netiek izvilkts ID. Pārbaudīju ar print_r izvadot $_GET masīvu, neko neatgriež. Cerams, ka varēsiet palīdzēt. EDIT: Tikko atklāju, ka ja pirmo kkas liek atsevišķu no .php faila nosaukuma, tad viss strādā, taču tiklīdz uzliec atpakaļ tādu pašu, kā .php failam, nestrādā. Edited March 3, 2010 by nemakuphp Quote Link to comment Share on other sites More sharing options...
2easy Posted March 3, 2010 Report Share Posted March 3, 2010 (edited) ar to .htaccess un adresi http://domain.tld/sub_dir/kkas/123 man viss strādā ;) print_r($_GET); // Array ( [id] => 123 ) Edited March 3, 2010 by 2easy Quote Link to comment Share on other sites More sharing options...
nemakuphp Posted March 3, 2010 Author Report Share Posted March 3, 2010 Man viņš strādā līdz brīdim, kamēr šeit http://domain.tld/sub_dir/kkas/123 esošais kkas nav vienāds ar kādu no php failiem, kas atrodas mapē. Tur arī problēma. Bet kā to novērst? Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted March 3, 2010 Report Share Posted March 3, 2010 Otrā un trešā rindiņa tavā .htaccess nozimē, ka tavs rewrite rule izpildīsies tikai tad, ja tāds fails vai direktorija neeksistē uz tava servera. Izņem tās rindiņas ja tu to nevēlies. Quote Link to comment Share on other sites More sharing options...
nemakuphp Posted March 3, 2010 Author Report Share Posted March 3, 2010 Vai tad lai fails eksistētu, viņš neskatās arī extension? Bet tikai faila nosaukumu? Quote Link to comment Share on other sites More sharing options...
2easy Posted March 3, 2010 Report Share Posted March 3, 2010 nē, tas ņem vērā precīzu nosaukumu ar visu extension. varbūt tev tur ir fails "kkas" bez extension vai folderis "kkas" Quote Link to comment Share on other sites More sharing options...
nemakuphp Posted March 4, 2010 Author Report Share Posted March 4, 2010 Nē, ir tikai fails kkas.php, nav ne mape, ne fails bez extension 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.