I made some searches on the web about URL rewriting, and found some good indications, but not what I hoped to find. For example, I have www.example.com?id=11 and I’d like to show something like www.example.com/mike where mike is the user for that id.
The best solution by now is to use rewrite as:
www.example.com/11/mike to www.example.com?id=11
I know how to write that rule, but is there a possibility to call that without the id number? Someway, to hide it?
First, you’re rewriting
www.abc.com/11/miketowww.abc.com?id=11, not the other way around, i.e., the first external request is written to the second internal request, which is then processed.To answer your question, no, unless your application knows how to fetch the object from
mikeinstead of11. If it does, you for instance could rewrite:or you could do it without query strings at all and read the data from
$_SERVER['PATH_INFO'], as long as your web server is correctly configured.