Make sure mod_rewrite is installed and loaded, make sure AllowOverride All is installed in the VirtualHost section of your conf file, and put these lines in your .htaccess file in the root directory of the web server document.
RewriteEngine on
RewriteRule ^$ main.php?page=home [L]
RewriteRule ^login uam.php?action=login [L, QSA, NC]
RewriteRule ^(.*)$ main.php?page=$1 [L, QSA, NC]
source
share