apache - .htaccess conversion of directories (and sub-directories) to query string -
i'm sure has been asked here before, can't find answer. it's quite simple, i'm sure. want take url like
example.com/article/3xamp1e/some-sort-of-title
and convert
example.com/article?handle=3xamp1e
through htaccess rewritecond in apache.
this should work :
rewriteengine on rewritecond %{the_request} /article/([^/]+)/([^\s]+) [nc] rewriterule ^ /article?handle=%1 [nc,l,r]
Comments
Post a Comment