I’m trying to write a simple .htaccess rule to change
https://webxxx.example.net/~test/id/123
to
https://webxxx.example.net/~test/show.php?id=123
But
https://webxxx.example.net/~test/id/123
is now redirected to my 404 page not found.
my .htaccess:
RewriteEngine on
RewriteRule ^\/?~test\/id\/(\w+)$ /~test/show.php?hash=$1
Why doesn’t this work?
The solution:
don’t need match the reference of public_html folder in regular expression, only in replace
thanks to all 🙂