Home › Forums › Other › How to remove subdirectories using mod_rewrite in .htaccess › Reply To: How to remove subdirectories using mod_rewrite in .htaccess
July 28, 2014 at 10:51 pm
#176731
ewisely
Participant
The code works like magic!!
RewriteCond %{THE_REQUEST} /q/([\w-]+)\.htm
RewriteRule ^.*$ /%1 [R=301]
But could you explain a little more about what the code does, so that I can learn how to use %{THE_REQUEST}
, \w-
and /%1
which look totally Greek to me. Thank you very much. :)