htaccess rewrite rule

I am using 7.1.1 trying to rewrite all requests for mydomain.com/chart.php?ID=1 to just mydomain.com/chart/1

I have this in my htaccess file but still not getting the results I want.

RewriteRule ^chart/(.*)$  chart.php?ID=$1 [QSA,L]

Basically trying to get tthe same thing as when going to a page created with the page builder, so I used the rewrite rule from there and changed the name of the page.

Any help would be greatly appreciated.

caredesign.net
Quote · 18 Apr 2013

Try this:

RewriteRule ^chart/([^/]*)$ /chart.php?ID=$1 [L]

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 18 Apr 2013

i figured out what I needed to change - It took a whole bunch of duplicating pages to get what I needed, but I made the link incorrect in the profiles.inc.php page:

function getClientProfileLink( $iID, $sLinkAdd = '' )
{
    $aProfInfo = getProfileInfo($iID);
    $iID = $aProfInfo['Couple'] > 0 && $aProfInfo['ID'] > $aProfInfo['Couple'] ? $aProfInfo['Couple'] : $iID;

    $sLink = '';
    if(getParam('enable_modrewrite') == 'on')
        $sLink = 'chart/' . $iID . ($sLinkAdd ? '&' . $sLinkAdd : '');
    else
        $sLink = 'chart.php?ID=' . $iID . ($sLinkAdd ? '&' . $sLinkAdd : '');

    return BX_DOL_URL_ROOT . $sLink;
}

Ioriginally had the section in red the same as the section in blue.

caredesign.net
Quote · 18 Apr 2013

Thanks HL, for your solution. I will file that answer away for future usage. That way I dont have to search through a bunch of pages to fix what I want. It was bad enough going through a million pages just to duplicate the friends section so i can create a client section from it.

caredesign.net
Quote · 18 Apr 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.