views:

20

answers:

1

I need help with some rewrite rule

Pretty much all my pages look like this:

index.php?key=guild&id=939&view=board
index.php?key=player&id=300941&view=edit
index.php?key=mod&id=41&view=download

Would i be possible to use 1 rewrite rule? Since all my pages have same $_get's

/guild/939/board
/player/300941/edit
+5  A: 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/?([^/]+)/([^/]+)/([^/]+)$ index.php?key=$1&id=$2&view=$3 [L,QSA]

Now, to change all those links in your project is possibly quite a lot more work :)

Wrikken
+1 you beat me to it by a landslide!
Abel
i love you man :)
Baloo
@Abel: mwouhaha!, @Baloo: you do give your love away very easily :P
Wrikken