PEAK XOOPS - Re: Testing /modules/ changer in englishin japanese

Re: Testing /modules/ changer

Target News
Subject Testing /modules/ changer
Summary Do you know short urls or simplified urls?Although it works fine with almost case, there are some unavoidable side effets .This hack is quite simple.You can change /modules/ as you like.I think there are much few side effect with this hack.insert 8 lin...

List posts in the topic

normal Re: Testing /modules/ changer

msg# 1.1.1.1.1
depth:
4
Previous post - Next post | Parent - Children.1 | Posted on 2006/2/17 10:16
stelian  Private   Posts: 7
Hi there. I allready wrote my code, but it is not working and i can't figure it out why.

mainfile.php looks like this
$GLOBALS['_rewriteRulesFrom'] = array(
'/buzau/',
'buzau/anunturi/',
'buzau/forum/',
'buzau/matrimoniale/',
);

$GLOBALS['_rewriteRulesTo'] = array(
'modules/modules/',
'modules/catads/',
'modules/newbb/',
'modules/friendfinder/',
);

function modules_changer( $s ) 
{
return str_replace( XOOPS_URL.'/modules/' , XOOPS_URL.'/buzau/' , $s) ;
return str_replace( XOOPS_URL.'/modules/catads/' , XOOPS_URL.'/buzau/anunturi/' , $s ) ;
return str_replace( XOOPS_URL.'/modules/newbb/' , XOOPS_URL.'/buzau/forum/' , $s ) ;
return str_replace( XOOPS_URL.'/mosules/friendfinder/' ,  XOOPS_URL.'/buzau/matrimoniale/' , $s ) ;
}
ob_start( 'modules_changer' ) ;

.htaccess:
RewriteEngine on
RewriteRule ^buzau/(.*)$ modules/$1 [L]
RewriteRule ^buzau/forum/(.*)$ modules/newbb/$1 [L]
RewriteRule ^buzau/anunturi/(.*)$ modu;es/catads/$1 [L]
RewriteRule ^buzau/matrimoniale/(.*)$ modules/friendfinder/$1 [L]

About one week ago i found something related to this http://www.xoops.org/modules/newbb/viewtopic.php?topic_id=42036&start=0

And everything is wright. But nothing change except from /modules/ to /buzau/ . Today, for almoust 10 hours i tested and still no result. At least can you tell me if the code it is OK? Please?
Votes:1 Average:10.00

Posts tree

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!