I need to make link mysite.com/view.php?id=123 shows page title instead of id=123.
in .htaccessi have
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) view.php?id=$1 [QSA,L])
Do i need a php file that will handle URLs?
Yes, because apache doesn’t know what title belongs to which ID in your application.
You could do it with a RewriteMap, but that required access to the main Apache configuration (it won’t work in an .htaccess), and is royal PITA more than anything really, so I wouldn’t really recommend that.
Just create a PHP file that parses $_SERVER[‘REQUEST_URI’], look up the title in the database, fetch the page that belongs to it, and show it. If no page exists with that title reply with a 404 not found header (and page).