1
modkid
Redirection module,
  • 2007/1/23 22:17

  • modkid

  • Just popping in

  • Posts: 60

  • Since: 2004/3/23


What redirection module do you guys advice me to use? I have many links to my old WFsection articles, but now it simply tells you that the selected module is not in use.

Is there some sort of module that will redirect the user back to the frontpage or anything? In a split second?

2
preachur
Re: Redirection module,
  • 2007/1/23 22:31

  • preachur

  • Just can't stay away

  • Posts: 525

  • Since: 2006/2/4 4


Just make a WFsection folder in your module folder with nothing but an index.html file with nothing in it but:
<script>history.go(-1);</script>
Then ignore the "module file not found" errors, or else put a seperate generic xoops_version.php in the folder, too that looks like this:
<?php
$modversion
['name'] = "WFsection";//name of module
$modversion['version'] = 1.01;
$modversion['description'] = "WFsection";
$modversion['author'] = "";
$modversion['credits'] = "";
$modversion['help'] = "";
$modversion['license'] = "GPL see LICENSE";
$modversion['official'] = 0;
$modversion['image'] = "whatever.gif";
$modversion['dirname'] = "WFsection";//name of directory on server

// Admin things
$modversion['hasAdmin'] = 0;
$modversion['adminpath'] = "";

// Menu/Sub Menu
$modversion['hasMain'] = 0;//make 0 to not have this appear in main menu


?>

Then just never install it and leave it in the available modules area.

If you need a re-direction script that re-directs ONLY to your main page from WFsection, even when visited from other sites, or a search engine, let me know and I'll post a code for that too.
Magick can never be restrained, but when freely given is thrice regained!

3
modkid
Re: Redirection module,
  • 2007/1/23 22:51

  • modkid

  • Just popping in

  • Posts: 60

  • Since: 2004/3/23


Heya,

Yeah i need a redirect, from whenever people visit my site from a searchengine or other sites.

4
preachur
Re: Redirection module,
  • 2007/1/23 23:00

  • preachur

  • Just can't stay away

  • Posts: 525

  • Since: 2006/2/4 4


Just make the plain index.html with nothing but this:
<html>
<
script>
    
location "http://YOURXOOPSINDEX.COM";
</
script>
</
html>

Just change the YOURXOOPSINDEX.COM part to your own address.
Magick can never be restrained, but when freely given is thrice regained!

5
Lance_
Re: Redirection module,
  • 2007/1/23 23:28

  • Lance_

  • Home away from home

  • Posts: 983

  • Since: 2004/1/12


You're looking for the Moved module.

Cheers.
GDL-Web.com :: Website development.
Xoopslance.com::Freelancing and Projects
thelionsden-arena.net:: Clan/League/Ladder Hosting

6
modkid
Re: Redirection module,
  • 2007/1/24 14:16

  • modkid

  • Just popping in

  • Posts: 60

  • Since: 2004/3/23


The Moved module screwed up my installation of xoops, so i won't be trying that again.

7
Dona_Brasil
Re: Redirection module,

I some code like this to redirect from my old dynamic URL's to my new, rewritten ones:

// redirect to avoid double content
if(strpos(getenv('REQUEST_URI'), '/index.php?lang=nl') === 0

 
header("HTTP/1.1 301 Moved Permanently");
 
header("Location: http://www.yourdomain.com/nl/");

elseif(
strpos(getenv('REQUEST_URI'), '/index.php?lang=en') === 0

 
header("HTTP/1.1 301 Moved Permanently");
 
header("Location: http://www.yourdomain.com/");

elseif(
strpos(getenv('REQUEST_URI'), '/index.php') === 0

 
header("HTTP/1.1 301 Moved Permanently");
 
header("Location: http://www.yourdomain.com/");
}


(see also this article)

You have to find the right place and file to do it. This could different for each module. I did this with trial and error(index.php, article.php, header.php etc). I did not do it for WF Section.

8
modkid
Re: Redirection module,
  • 2007/1/24 21:47

  • modkid

  • Just popping in

  • Posts: 60

  • Since: 2004/3/23


I made a custom 404 page that redirects to my frontpage, so that solves the problem :).

Thanks for the help though.

Login

Who's Online

171 user(s) are online (107 user(s) are browsing Support Forums)


Members: 0


Guests: 171


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits