Friendly URLs, getting them activated.. ?
Ok this might be really basic, but i've tried searching and tried looking around..
The .htaccess file is there by default, and SEF URLs DO work.. eg if I manually type in /discussion/1/ then it DOES load discussion ID 1.. but how do I make it so all the links are correct? Eg right now all my links in Vanilla still use the normal URLs not the friendly URLs.. ?
There's nothing in the settings.. and as per the addon I tried adding the following line to my settings file:
$Configuration['URL_BUILDING_METHOD'] = 'mod_rewrite';
..but it didn't change anything.
What am I missing here?! :(
0
This discussion has been closed.
Comments
$Configuration['URL_BUILDING_METHOD'] = 'mod_rewrite'; // Standard or mod_rewriteedit: DOH!... I need to re-read the thread.
The urls are built in the framework/Framework.Functions.php file, if you insert some strategic comments in the getUrl function you can effectively bypass the configuration setting:
function GetUrl(&$Configuration, $PageName, $Divider = '', $Key = '', $Value = '', $PageNumber='', $Querystring='', $Suffix = '') {// if ($Configuration['URL_BUILDING_METHOD'] == 'mod_rewrite') {
if ($PageName == './') $PageName = 'index.php';
return $Configuration['BASE_URL']
.($PageName == 'index.php' && $Value != '' ? '' : $Configuration['REWRITE_'.$PageName])
.(strlen($Value) != 0 ? $Divider : '')
.(strlen($Value) != 0 ? $Value.'/' : '')
.(($PageNumber != '' && $PageNumber != '0' && $PageNumber != '1') ? $PageNumber.'/' : '')
.($Suffix != '' ? $Suffix : '')
.($Querystring != '' && substr($Querystring, 0, 1) != '#' ? '?' : '')
.($Querystring != '' ? $Querystring : '');
/* } else {
if ($PageName == './' || $PageName == 'index.php') $PageName = '';
$sReturn = ($Value != '' && $Value != '0' ? $Key.'='.$Value : '');
if ($PageNumber != '') {
if ($sReturn != '') $sReturn .= '&';
$sReturn .= 'page='.$PageNumber;
}
if ($Querystring != '' && substr($Querystring, 0, 1) != '#') {
if ($sReturn != '') $sReturn .= '&';
$sReturn .= $Querystring;
}
if ($sReturn != '') $sReturn = '?'.$sReturn;
if ($Querystring != '' && substr($Querystring, 0, 1) == '#') $sReturn .= $Querystring;
return $Configuration['BASE_URL'].$PageName.$sReturn;
} */
}