Forum Moderators: phranque
http://www.example.com/somecategory/some-article/index.php
redirect to:
http://www.example.com/somecategory/some-article
http://www.example.com/somecategory/some-article/ i got a 500 error putting this on... i even cleared everything else from the file... any other tips?
// Get the Joomla URL instance
$u =& JURI::getInstance();
// Get the complete URL
$commmonurl = $u->toString();
// Create a new URL and strip index.php from it.
$newurl = str_replace('index.php','',$commmonurl);
// let's find index.php
$found = strpos($commmonurl,'/index.php');
if found returns true then redirect user to $newurl.