php - Query redirect and clean up
356
I have been trying to get this working and watched other threads but nothing worked for me, i would like to redirect: http://domain.net/stats.php?player=Matan
to: http://domain.net/stats/Matan
Would that be possible?
Answer
Solution:
You can use
.htaccess
file with mod_rewrite module enabled on Apache2You can follow this simple tutorial https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_rewrite
In this case I used a simple regex in the RewriteRule, you can customize your regex whatever you like
EDIT: exceptions for static files
please, read the docs