Alias /cacti/ /var/www/cacti/
DirectoryIndex index.php
Options -Indexes
AllowOverride all
order deny,allow
deny from all
allow from 127.0.0.1
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc on
php_flag track_vars on
to display the alias successfully in the browser do not forget the terminating slash at the end, so
http://localhost/cacti/ is right.