anonīms Posted December 4, 2008 Report Share Posted December 4, 2008 izmantojot mod_rewrite (pašlaik netieku pie sava htaccess, bet kods ir apmeram tads) RewriteRule ^/(*)/?$ index.php?page=$1 [L,N] tātad ejot ?page=daba tiek izmantots www.manalapa.lv/daba/ bet atkal ir cita lieta saistībā ar to, ka man uz hosta stāv vel citas web lapas, piem /gribu_grapu/ un tajā mājaslapā es netieeku iekšā jo htaccess uzskata, ka es vnk gribu iet uz ?page=gribu_grapu. Vai to ir iespējams novērst un izdarīt kaut kā tā, lai es tieku iekšā arī subfolderos? Link to comment Share on other sites More sharing options...
Aleksejs Posted December 4, 2008 Report Share Posted December 4, 2008 Es daru tā, ka visas "dinamiski ģenerētās" adreses turu atsevišķā neeksistējošā mapē (piemēram - saturs). Līdz ar to, mans mod_rewrite rule izskatās: RewriteRule ^saturs/([a-zA-z0-9 _-]+)/?$ index.php?page=$1 [L] Link to comment Share on other sites More sharing options...
andrisp Posted December 4, 2008 Report Share Posted December 4, 2008 Varbūt tev noder: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d Link to comment Share on other sites More sharing options...
anonīms Posted December 4, 2008 Author Report Share Posted December 4, 2008 tas man jau ir andrisp. Aleksejs, bet man vajag www.manalapa.lv/kautkas/ :< Link to comment Share on other sites More sharing options...
Aleksejs Posted December 4, 2008 Report Share Posted December 4, 2008 Respektīvi Tev ir šāds rulis, ja? RewriteCond %{REQUEST_FILENAME} !-f [NC,OR] RewriteCond %{REQUEST_FILENAME} !-d [NC] RewriteRule ^/(*)/?$ index.php?page=$1 [L] Link to comment Share on other sites More sharing options...
anonīms Posted December 4, 2008 Author Report Share Posted December 4, 2008 (edited) nedaudz savādāks. Tavus [NC OR] pieliku, bet nekas nemainas. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-zA-Z_]+)/?$ index.php?page=$1 [QSA,L] Edited December 4, 2008 by anonīms Link to comment Share on other sites More sharing options...
Delfins Posted December 4, 2008 Report Share Posted December 4, 2008 tas man jau ir andrisp. neticu... klasiskā "shēma"un man ne reizi nav pievīlusi! Link to comment Share on other sites More sharing options...
Aleksejs Posted December 4, 2008 Report Share Posted December 4, 2008 Atvaino, kļūdījos - OR tur toč nav vajadzīgs. Link to comment Share on other sites More sharing options...
anonīms Posted December 4, 2008 Author Report Share Posted December 4, 2008 OR izņēmu, bet tāpat.. Pilns htaccess http://paste.php.lv/10f4638e8e07ee6780fbe1e488af1d4d Link to comment Share on other sites More sharing options...
Aleksejs Posted December 4, 2008 Report Share Posted December 4, 2008 Neesmu pārliecināts, bet vai RewriteCond'i neattiecas tikai uz pirmo RewriteRule? Link to comment Share on other sites More sharing options...
Delfins Posted December 4, 2008 Report Share Posted December 4, 2008 man liekas tā arī bija :) RewriteCond %{HTTP_USER_AGENT} ^Mozilla.* RewriteRule ^/$ /homepage.max.html [L] RewriteCond %{HTTP_USER_AGENT} ^Lynx.* RewriteRule ^/$ /homepage.min.html [L] RewriteRule ^/$ /homepage.std.html [L] Link to comment Share on other sites More sharing options...
anonīms Posted December 4, 2008 Author Report Share Posted December 4, 2008 :)) viss iet. Link to comment Share on other sites More sharing options...
Recommended Posts