PDA

View Full Version : how to change myfunctions.ini (site shift)


sunshine
2007-06-13, 11:38 AM
Hi, I want too let my site's url looks like abc_23.html, not 23/abc.html.

Please teach me how to change "include/myfunctions.ini" and ".htaccess"

Thanks in advance.

sunshine
2007-06-13, 11:40 AM
You'll need to edit myfunctions.ini.php about line 48:
$return = $LINK_BASE . $id . '/' . $keywords . '/';


Change to your desired format. Possibly something like:
$return = $LINK_BASE . $keywords . '_' . $id . '.html';

Also edit .htaccess line:
RewriteRule ^([0-9]+)/.*$ index.php?go=subcat&id=$1 [L,NC]

Possibly something like:
RewriteRule ^.*_([0-9]+).html$ index.php?go=subcat&id=$1 [L,NC]

topvip
2007-08-17, 11:54 PM
If you want to let my site's url looks like abc_cde-23.html, not 23/abc.html.

You'll need to edit myfunctions.ini.php about line 48:
$return = $LINK_BASE . $id . '/' . $keywords . '/';

Change to your desired format. Possibly something like:
$return = $LINK_BASE . $keywords . '-' . $id . '.html';

Also edit .htaccess line:
RewriteRule ^([0-9]+)/.*$ index.php?go=subcat&id=$1 [L,NC]

Possibly something like:
RewriteRule ^.*-([0-9]+).html$ index.php?go=subcat&id=$1 [L,NC]

topvip
2007-08-17, 11:58 PM
If you want to let my site's url looks like abc-cde-23.html, not 23/abc.html.

you also need to change:
at line 32 33
$keywords = str_replace(' ','_',$keywords);
$keywords = eregi_replace("[_]+",'_',$keywords);


something like:
$keywords = str_replace(' ','-',$keywords);
$keywords = eregi_replace("[_]+",'-',$keywords);