User by reference

site.com/a/qwerty 

sees page content

 site.com/var.php?q=qwerty&res=a 

What do you need for this to register in .htaccess ?

    1 answer 1

     RewriteRule ^([^/]+)/([^/]+)$ var.php?q=$2&res=$1 
    • thank! and how to make an exception? Suppose I have a directory / dice /, which is a completely different project. when trying to access it via the link "site.com/dice", htaccess thinks that it is necessary to show "site.com/var.php?q=index.php&res=dice". but it is necessary to untie from such redirection. Is there a condition for this in .htaccess? - Egor Randomize