Friday, February 27, 2015

apache 2.2 - mod_rewrite rewrite rule required to strip section of route and add to end of query string

I'm using an API that puts a unique id in the route and then I need that unique ID moved into my internal routing (so php can work with it).



The url is:





http://top.level.domain/folder/[UNIQUEID]/index.php




The file on the server to host is actually located at:




http://top.level.domain/folder/index.php




So I need to turn the original URL into:





http://top.level.domain/folder/index.php/[UNIQUEID]




Any ideas of a rewrite rule that would do what I need?



(Duplicate question closed on stackoverflow.)

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...