Jump to content

Php Redirection code


softmind82

Recommended Posts

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.uk

Thanks
Link to comment
Share on other sites

[!--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
Link to comment
Share on other sites

From looking at the code it looks like you can supply a url prarameter called return

To 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]
Link to comment
Share on other sites

[!--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 return

To 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.
Thanks

CHeck this where i made a changing as u said.. www.desigeneration.co.uk


i have posted this probelm on joomla but i havnt received any reply fromlast 24 hours .
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.