Remove index.php from Joomla! URLs with NGINX
How do I remove
index.php
from my Joomla URLs? For example:http://example.com/index.php/webpage
should becomehttp://example.com/webpage
. I've been following some guides that I've found, but it all result in a redirect loop…
As explained at nginx redirect loop, remove index.php from url, you'd want something like this to make sure there aren't any redirect loops:
index index.php index.html index.htm;if ($request_uri ~ "^/(.*)(?<=/)index\.php/?((?<=/).*)?$") { return 301 /$1$2; }
The above assumes that manually omitting the index.php
part of the URL is already handled correctly through the rest of your configuration.