Rewrite GET requests as virtual sub-folders in Apache

apache-logoIn search of a solution, to rewrite an one-parameter GET Request as virtual sub-folders, limiting it to specific values, I concluded to write the above Apache .htaccess rewrite rule.

This script, rewrite the value of the parameter named id, with the accepted values a,b or c as virtual sub-folders of a destination.


RewriteEngine On
RewriteRule ^(a|b|c)\/?$ /?id=$1 [L]


  • rewrited as
  • rewrited also as
  • is not rewrited