Wuu Posted March 13, 2010 Report Share Posted March 13, 2010 (edited) Ir adrese http://xxx/1293/ieskats-dead-space-2/ vajag lai reaģētu tikai uz cipariem RewriteRule ^([1-9]*).?$ index.php?page=news&id=$1 [L] Nekādīgi nevaru iebraukt tajos ķeburos... Kā būs pareizi? Edited March 13, 2010 by Wuu Quote Link to comment Share on other sites More sharing options...
2easy Posted March 13, 2010 Report Share Posted March 13, 2010 tie "ķeburi" ir parasta perl regulārā izteiksme http://www.php.net/manual/en/reference.pcre.pattern.syntax.php Quote Link to comment Share on other sites More sharing options...
waplet Posted March 13, 2010 Report Share Posted March 13, 2010 es jau labāk izvelētos 2easy variantu, kur "rewrite" engine daļa,teorētiski, notiek iekš PHP. Quote Link to comment Share on other sites More sharing options...
Wuu Posted March 13, 2010 Author Report Share Posted March 13, 2010 Lūdzu gatavu variantu studijā. Quote Link to comment Share on other sites More sharing options...
waplet Posted March 13, 2010 Report Share Posted March 13, 2010 .htaccess Allow from all RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} -d [OR] RewriteCond %{REQUEST_FILENAME} -f RewriteRule .* - [L] RewriteRule ^(.*)$ index.php?page=$1 [QSA,L] index.php $a = explode('/', $_GET['page']); $sLapa = isset($a[0]) ? $a[0] : null; $sId1 = isset($a[1]) ? $a[1] : null; $sId2 = isset($a[2]) ? $a[2] : null; 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.