网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   Web Directory (https://www.0058.net/forumdisplay.php?f=60)
-   -   how to change myfunctions.ini (site shift) (https://www.0058.net/showthread.php?t=2444)

sunshine 2007-06-13 11:38 AM

how to change myfunctions.ini (site shift)
 
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:
Code:

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

$return = $LINK_BASE . $keywords . '_' . $id . '.html';
Also edit .htaccess line:
Code:

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

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:
Quote:

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

$return = $LINK_BASE . $keywords . '-' . $id . '.html';
Also edit .htaccess line:
Quote:

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

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
Quote:

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

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


All times are GMT +8. The time now is 11:00 AM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.