I’m trying to create an .htaccess file to replace query parameters with a forward slash.
The URL changes successfully but I get a 404.
Basically, I want the url to be like:
domain.com/value
Instead of:
domain.com/index.php?id=value
This is my .htaccess file:
RewriteEngine On
RewriteCond %{QUERY_STRING} ^id=([^&]+)$
RewriteRule ^index.php$ /%1? [R=301,L]
RewriteRule ^value$ index.php?id=value [L]