Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Redirect out of the database  (Read 2101 times)

0 Members and 1 Guest are viewing this topic.

Fly Fort

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
    • http://www.militaryaircraftcollection.info
Redirect out of the database
« on: March 20, 2004, 02:11:02 pm »

On all the pages of my website I've placed the following code:
Code: [Select]
<SCRIPT TYPE="text/javascript" LANGUAGE="javascript">
function detect()
{
framesetpage="index.htm";
thispage=window.location.href;
if (thispage.indexOf('://')<0) {thispage="://"+thispage;};
prefix=thispage.substring(0,thispage.lastIndexOf('://'));
suffix=thispage.substring(thispage.lastIndexOf('://')+2,thispage.length);
if (parent.location.href==window.location.href) {
parent.location.href=framesetpage+"?"+prefix+"&&&"+suffix};
}
</script>


Thereby, people who find a page of my site by searching a searchengine (Google, Yahoo...) wil be redirected to my indexpage.

Now I would like this to happen also if people directly go to a page on my dbase. So if they go to http://www.militaryaircraftcollection.info/visualdbase/displayimage.php?album=lastup&cat=&pos=0 for example, they should be redirected to http://www.militaryaircraftcollection.info/index.htm instead. How do I do this??
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Redirect out of the database
« Reply #1 on: March 20, 2004, 05:03:53 pm »

You can try putting it in the scripts.js file. Then you'll need to alter the template.html file for each theme you are using accordingly.
Logged
&quot;Then, Fletch,&quot; that bright creature said to him, and the voice was very kind, &quot;let&#039;s begin with level flight . . . .&quot;

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 14 queries.