To change URL layout for phpipam from http://phpipam.net/?page=subnets&sectionId=2 to http://phpipam.net/subnets/2/ please follow this guide.

1.) Set BASE directive

set base in config.php (If you have it under root directory of your webserver than you can skip it)
define('BASE', "/phpipam/");

2.) Mod rewrite settings

Make sure apache supports mod_rewrite for web server, if it does not you will get errors /install/ not found (http 404) and similar. This means that either apache is not set to use .htaccess rewrites, or that you did not specify the rewritebase in step2 correctly.

Search for Directory directive in default apache config and add/change it to

vi /etc/apache2/sites-enabled/000-default
Options FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all

On debian you have to manually enable rewrite mod for apache, you can do it manually or via a2enmod

ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load

or

sudo a2enmod rewrite

And restart apache:

/etc/init.d/apache2 restart

3.) Mod_dir and mod_rewrite clash

If you have both mod_dir and mod_rewrite enabled for Apache versions between 2.2.21 and 2.4.2 and experiencing rewrite issues please take a look at below threads, there is a bug at apache:

https://bz.apache.org/bugzilla/show_bug.cgi?id=53929
https://sourceforge.net/p/phpipam/bugs/193/


  1. Home
  2. Documentation