My site started out as a forum so all members have that URL bookmarked. Now that I have Mambo installed, I want users to pass through the CMS instead of jumping directly to the forum. Is their a way I can "force" SMF to redirect them to the front page?
yes but this will actually kill al the links, i mean a link like index.php?topic=XXX wl not be forwarded to the topic so you need also to include the whole $_GET inside the header function, but of course by doing a foreach to make it one string like
Code:
<? $string = "" foreach ($_GET as $key => $value) $string .= "$key=$value&" if (strpos($_SERVER['QUERY_STRING'], 'dlattach') === false) { defined('_VALID_MOS') or header("Location: http://www.yoursite.com/index.php?option=com_smf&Itemid=XX&$string"); } ?>
how that??? heaser("Location : http://www.yoursite.com"); will never redirect to somewhere else than the frontpage ... that's what i meant... you need to explicity include all get requests to be able to be forwarded correctly, because index.php?action=mm (member map) must not go to the mambo frontpage but to Wraped (or unwraped like it is set) member map
My code snippet is for the wrapped mode which is the code being used in this forum. I don't know if your code is for unwrapped mode in which I haven't tried.
« Last Edit: April 09, 2005, 04:11:26 AM by admin »
My code snippet is for the wrapped mode which is the code being used in this forum. I don't know if your code is for unwrapped mode in which I haven't tried.
yes but you didn't understand me, if (for example) another site have a link to a post on the old unwrapped forum ( http://www.yoursite.com/forum/index.php?topic=1500.0 ) if he used your method, he will be reirected to Mambo Frontpage instead of the topic, means broken link,
None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by MamboHacks.com. Powered by Mambo. All rights reserved. TERMS OF USE