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

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -