Simple Machines Community Forum

General Community => Scripting Help => Aiheen aloitti: johnsonbobby - tammikuu 25, 2008, 03:12:29 AP

Otsikko: index page redirect
Kirjoitti: johnsonbobby - tammikuu 25, 2008, 03:12:29 AP
hello , i was wondering if someone could tell me how to have my Index page redirect to the members list .
im looking to do away with the forums boards and base everything around the memberslist and profile pages .

thanks .
Otsikko: Re: index page redirect
Kirjoitti: vikk - tammikuu 26, 2008, 08:58:57 AP
<script type="text/javascript">
var redirect="URL OF THE MEMBER LIST";
window.location.href=redirect;
</script>


Should work. Put it in the index.template.php, I suppose.
Otsikko: Re: index page redirect
Kirjoitti: jamesk - tammikuu 26, 2008, 09:59:08 AP
I'm not sure if that'll work...  Isn't the index.template.php file loaded every time (resulting in an endless loop)?

bobbyjohnson-online:

When you say want the "index page" to redirect, do you mean your website homepage (ie www.YOURSITE.com)?  If you want to have that redirect automatically, you can just put this as your index.php :


<?php
header
('Location: http://www.YOURWEBSITE.COM/forum/index.php?action=mlist');
?>



(or whatever your path is the forum)...