Jump to content
php.lv forumi

mod_rewrite


anonīms

Recommended Posts

RewriteRule ^([a-zA-Z_]+)/([0-9]+)/?$ index.php?page=$1&id=$2 [QSA,L]

ejot caur www.manalapa.lv/?page=user&id=1 viss iet.

ejot caur www.manalapa.lv/user/1 arī viss iet, bet man vajag www.manalapa.lv/user/1/

 

mēģināju flagu arī bez L, bet efekts - nekāds.

kur varētu būt problēma?

 

Piev: palabojot

RewriteRule ^([a-zA-Z_]+)/([0-9]+)/ index.php?page=$1&id=$2 [QSA]

uz

RewriteRule ^([a-zA-Z_]+)/([0-9]+)/?a$ index.php?page=$1&id=$2 [QSA]

un ejot www.manalapa.lv/user/1/a viss iet.

Edited by anonīms
Link to comment
Share on other sites

nu jā.

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ index.php?page=$1 [QSA]
RewriteRule ^lang/(.*)$ index.php?lang=$1 [QSA,L]
RewriteRule ^([a-zA-Z_]+)/([0-9]+)/$ index.php?page=$1&id=$2 [QSA,L]

viss dokuments

Link to comment
Share on other sites

Bija aizdomas, ka viņš varētu būt pie vainas, jo atrodas pirms tā..

Nu, bet kā labot?

 

ok, /1/ iet tagad

 

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^lang/(.*)$ index.php?lang=$1 [QSA,L]

RewriteRule ^([a-zA-Z_]+)/([0-9]+)/$ index.php?page=$1&id=$2 [QSA,L]

RewriteRule ^mail/(.*)?$ index.php?page=mail&do=$1 [QSA,L]

 

Bet tagad neiet ja eju www.manalapa.lv/users/

Edited by anonīms
Link to comment
Share on other sites

×
×
  • Create New...