I have used following mod_rewrite rules:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %(REQUEST_FILENAME) !-l
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]

to get www.myweb.com/newyork from www.myweb.com/index.php?url=newyork.

Now I trying to get pretty url for this page

www.myweb.com/itemdetail?itemid=1000

to

www.myweb.com/itemdetail/1000

I have been trying several mod_rewrite rules, but I have not been able solve it. Following are few rules I tried but no success.

 #RewriteCond %{QUERY_STRING} ^itemid=([A-Za-z0-9]+)
 #RewriteRule ^itemdetail.php /itemdetail/%1? [R=301,L]
 #RewriteRule ^itemid/([A-Za-z0-9]+)/?$ itemdetail.php?itemid=$1 [L]

 #RewriteRule ^itemdetail/([0-9]+)/?$ itemdetail.php?itemid=$1 [NC,L]
 #RewriteRule ^itemdetail/([0-9]+)/$ itemdetail.php?itemid=$1 [NC,L] 

Any suggestion?

I think you should use only line 5. It looks correct, what problem do you have with it?

But if you add it after the one you mentioned first (the one that works), then possibly this new one never gets triggered.