I want to make it so that "/XXX/" (which is not an existing file directory) points to "/filename.php?var=1" I want the imaginary /XXX/ to be in the same dir as /filename.php. Could anyone help me out with the .htaccess code I need to make this work? Thanks.
You need the filepath be something that will be interpreted in the variable, so something like /123/ will redirect o /filename.php?var=123 in this case RewriteRule ^/([a-zA-Z0-9]+)/$ /filename.php?var=$1 [L] Cheers,