I have a site with a video player, created with php.
I have mangaged to clean up the URL from www.website.com/player.php?id=10
to www.website.com/player/10
, where 10
is the id for a given video.
The code for the .htaccess file is like this:
RewriteEngine On
RewriteRule ^player/([0-9]+)$ player.php?id=$1
This works fine if I directly enter www.website.com/player/10
, however, if someone tries to access the old links, they are not redirected. How can I do this in the .htaccess file?