0

I have three different types of URL schemes in my website:

  1. http://example.com/page.php
  2. http://example.com/anotherpage.php/23 where 23 is the id and is being captured as GET data.
  3. http://example.com/yetanotherpage.php/23/somedata where 23 and somedata is being captured as GET data.

What I need as a .htaccess rule is whatever comes after example.com/ should be considered as PHP page, such that:

  1. http://example.com/page.php be converted to http://example.com/page
  2. http://example.com/anotherpage.php/23 be converted to http://example.com/anotherpage/23
  3. http://example.com/yetanotherpage.php/23/somedata be converted to http://example.com/yetanotherpage/23/somedata

I was able to write rules for #1 but didn't find anything for #2 and #3.

0 Answers0