.htaccess

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
psychotomus
Forum Contributor
Posts: 487
Joined: Fri Jul 11, 2003 1:59 am

.htaccess

Post 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
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post 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?
Post Reply