softmind82 Posted June 3, 2006 Share Posted June 3, 2006 i am using joomla content management system and i want to redirect the page to mypages.php after login authentication which is outside from joomla , how can i make that ......-------------------------------------------where and what code i should put to redirect it .i made some changing with redirection but its redirection but without authentication .. check this www.desigeneration.co.ukThanks Quote Link to comment https://forums.phpfreaks.com/topic/11104-php-redirection-code/ Share on other sites More sharing options...
.josh Posted June 3, 2006 Share Posted June 3, 2006 have to look in joomla's script and find where does the authenticate condition and if authenticated, redirect with a header or something. you'd probably have better luck finding where in their script it is by going to their website. Quote Link to comment https://forums.phpfreaks.com/topic/11104-php-redirection-code/#findComment-41515 Share on other sites More sharing options...
softmind82 Posted June 3, 2006 Author Share Posted June 3, 2006 [!--quoteo(post=379685:date=Jun 3 2006, 01:41 PM:name=Crayon Violent)--][div class=\'quotetop\']QUOTE(Crayon Violent @ Jun 3 2006, 01:41 PM) [snapback]379685[/snapback][/div][div class=\'quotemain\'][!--quotec--]have to look in joomla's script and find where does the authenticate condition and if authenticated, redirect with a header or something. you'd probably have better luck finding where in their script it is by going to their website.[/quote]i am not fimilar to php .could u plz write me exact syntaz of php redirection code .Thanks Quote Link to comment https://forums.phpfreaks.com/topic/11104-php-redirection-code/#findComment-41524 Share on other sites More sharing options...
.josh Posted June 3, 2006 Share Posted June 3, 2006 i can't write you the exact code, as i do not have a copy of joomla sitting in front me to figure out how they have their script setup. but as far as doing redirection in php:[a href=\"http://www.php.net/header\" target=\"_blank\"]http://www.php.net/header[/a] Quote Link to comment https://forums.phpfreaks.com/topic/11104-php-redirection-code/#findComment-41529 Share on other sites More sharing options...
wildteen88 Posted June 3, 2006 Share Posted June 3, 2006 From looking at the code it looks like you can supply a url prarameter called returnTo do so you need to open up a file called [b]mod_login.php[/b] for editing which is in the [b]modules[/b] folder.Scroll down to line 75 and you should find this:[code] <form action="<?php echo sefRelToAbs( 'index.php' ); ?>" method="post" name="login" >[/code]change that to the following:[code] <form action="<?php echo sefRelToAbs( 'index.php' ); ?>?return=pagename.php" method="post" name="login" >[/code]change where it says [b]pagename.php[/b] to the actuall file you want the users to be redirected to when they login.I'm not sure that is the correct way to do it but have a quick look at the code it seems thats the way to do it. You can always ask how you can do such a thing over at the offical [a href=\"http://forum.joomla.org/\" target=\"_blank\"]joomla forum[/a] Quote Link to comment https://forums.phpfreaks.com/topic/11104-php-redirection-code/#findComment-41543 Share on other sites More sharing options...
softmind82 Posted June 3, 2006 Author Share Posted June 3, 2006 [!--quoteo(post=379713:date=Jun 3 2006, 02:39 PM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Jun 3 2006, 02:39 PM) [snapback]379713[/snapback][/div][div class=\'quotemain\'][!--quotec--]From looking at the code it looks like you can supply a url prarameter called returnTo do so you need to open up a file called [b]mod_login.php[/b] for editing which is in the [b]modules[/b] folder.Scroll down to line 75 and you should find this:[code] <form action="<?php echo sefRelToAbs( 'index.php' ); ?>" method="post" name="login" >[/code]change that to the following:[code] <form action="<?php echo sefRelToAbs( 'index.php' ); ?>?return=pagename.php" method="post" name="login" >[/code]change where it says [b]pagename.php[/b] to the actuall file you want the users to be redirected to when they login.I'm not sure that is the correct way to do it but have a quick look at the code it seems thats the way to do it. You can always ask how you can do such a thing over at the offical [a href=\"http://forum.joomla.org/\" target=\"_blank\"]joomla forum[/a][/quote]i did the same thing and in return it redirect to [b] mypage.php [/b] without authentication, i mean what ever i enter in login detail it just accept but that login information is not yet saved in datad base....... if you enter ghgjhg user and password whtever it it redirect to the page but i need login authentication before that ,i would appreciate your help.ThanksCHeck this where i made a changing as u said.. www.desigeneration.co.uki have posted this probelm on joomla but i havnt received any reply fromlast 24 hours . Quote Link to comment https://forums.phpfreaks.com/topic/11104-php-redirection-code/#findComment-41547 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.