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 -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -