Hi,
I was hoping someone could help me with a rewrite question.
Currently, I use a basic rewrite for my url shortener.
if (!-e $request_filename) {
rewrite ^/(.*)$ /entry/index.php?id=$1 permanent;
}
This forwards a url like http://www.domain.com/1234 to http://www.domain.com/entry/index.php?id=1234. It works great.
The problem is that I've realized that pretty urls are strongly preferred by google.
So I would like following scenario:
http://www.domain.com/1234 to rewrite to http://www.domain.com/entry/index.php?id=1234 while showing the user http://www.domain.com/1234/this-is-the-pretty-part in the address bar
Can anyone tell me what is the best way to do this?
Thanks,
slevytam