Page 1 of 1

.htaccess

Posted: Sun Feb 18, 2007 10:18 pm
by psychotomus
whats wrong with this

RewriteRule ^game([_A-Za-z0-9-]+)?$.html /game.php?id=$1 [NC,L]

my URL now is game.php?id=NUM

i want to change it to gameNUM.html

Posted: Sun Feb 18, 2007 11:37 pm
by Kieran Huggins
$ matches the end of the string - you have it in the middle.

play in http://www.cuneytyilmaz.com/prog/jrx/ until you get the results you're looking for..

start with "^game([_A-Za-z0-9-]+).html$" - but why stop there? Why not match "game/NUM" as "^game\/([_A-Za-z0-9-]+)$" and have clean URLs?