Remove index.php from Joomla SEF Links

sef.png

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]

About YellowWebMonkey

YellowWebMonkey Web design offers reliable website design, SEO and digital marketing services for Joomla, WordPress and Shopify sites. We strive to be a one-stop shop for all your web needs.

Recent Posts

Follow Us