YellowWebMonkey Web Design

sef.png

Remove index.php from Joomla SEF Links

sef.pngThere are probably a hundred articles that tell you how to change your Joomla settings to remove the /index.php/ from your links, but not a place to show you how to properly redirect existing indexed URLs to the new variant.  Add the below code to your .htaccess file.  If you already turned on the “Use URL Rewriting” feature, then it is already in your root folder of your Joomla website.

 

RewriteEngine On

 

Remove from middle of url

RewriteEngine On

RewriteCond %{REQUEST_URI} ^/index\.php/

RewriteRule ^index.php/(.*) /$1 [R,L]

 

Remove from end of url

RewriteEngine On

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)index\.php($|\ |\?)

RewriteRule ^ /%1 [R=301,L]

Scroll to Top