Wiki
Clone wikiDevFecta Public Repository / Apache Configuration
Setup Friendly URLs
http://localhost/index.php?url=pageTag to http://localhost/pageTag
Enable the mod_rewrite module
sudo a2enmod rewrite
Configure the server to recognize .htaccess files by modifying the 000-default.conf file
sudo nano /etc/apache2/sites-available/000-default.conf
<p> <Directory /var/www/html><br/> Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted </Directory> </p>
sudo systemctl restart apache2
Enable the RewriteEngine and set the RewriteRule
At a minimum add the following code to the website's .htaccess file:
RewriteEngine On RewriteBase / RewriteRule ^([^/]+)/? index.php?url=$1 [L,QSA]
Updated