I am looking for a way to "predict" with PHP how an url will be rewritten by my htaccess file.
Eg: www.domain.com/category/B/Nice-Article
gets rewritten to:
www.domain.com/article.php?category=B&slug=Nice-Article
This all works well. I need a PHP function that would work as follows:
function previewModRewrite(url){
//some magic stuff happens based on the rewrite rules on my server
}
If I call the function
previewModRewrite("www.domain.com/category/B/Nice-Article")
it should return:
www.domain.com/article.php?category=B&slug=Nice-Article
Just to clarify: this script will run on my server on the same domain as where the htaccess file is located.