To enable "nice links" in Drupal versions 5 and 6 you need to site root directory create file .htaccess
with content like this:
RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
After that, in the Drupal control panel in the section "Control → Site setup → Clean links»Include clean links.