See if maybe this works?
RewriteRule ^people/([0-9]+).*$ single-player.php?id=$1 [L,NC]
I'm building a new version of a PHP app that has over 180k news items stored in the Database. Many contain hardcoded links in the news.body to the old file structure, which points to something like this
people/7768-denis-grabe/ while the new file structure should be
I'm really bad with REGEX and have very little understanding of how to work with .htaccess but I've been trying for two days to make a URL Rewrite rule which I think it's almost there but not quite yet.
In my .htaccess I have:
RewriteEngine On RewriteRule ^people/([0-9]+)/?$ single-player.php?id=$1 [L]
It's not just rewriting the end of the URL, it's redirecting to the actual file, appending the
http://localhost:c/xampp/... which gets me a 403 error forbidden page:
All I need is to get the ID out of that first URL and rewrite it so it would redirect to the same address and just insert the ID as a GET request.
I'm working with XAMPP,
AllowOverride All are already on