Hello.
I am writting my own small framework and I am going to implement friendly URLs there. mod_rewrite is great. But I want to be able to handle several types of friendly URLS at once:
/index.php?ac=user&an=showprofile (fallback variant, the worst)
/index.php/user/showprofile (supposedly, can be disabled by security settings)
index.php?user/showprofile (optional, not needed)
/user/showprofile (ideal, but requires mod_rewrite or dirty ErrorDocument tricks)
I would like all the variants to be supported at once so that old links generated with whatever scheme would be forever valid. Should I write my own parse functions for this or, may be, I missed some library/script, that can do that? Extracting algos from big frameworks like Symfony or Zend is quite difficult. There are also many different unobvious cases like correctl handling URLs UTF-8 encoded or with magic_quotes_runtime etc...