index php remove in ubuntu 20.04 wordpress

Allow overriding htaccess in Apache Configuration (Command)

sudo nano /etc/apache2/apache2.conf

and edit the file & change to

AllowOverride All

Enabled apache mod rewrite (Command)

sudo a2enmod rewrite

Restart Apache (Command)

sudo /etc/init.d/apache2 restart

Add code inside of .htaccess

RewriteEngine on

RewriteCond $1 !^(index.php)

RewriteRule ^(.*)$ index.php/$1 [L]
Leave a Comment