Redirect out of the database Redirect out of the database
 

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]

Main Menu

Redirect out of the database

Started by Fly Fort, March 20, 2004, 02:11:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Fly Fort

On all the pages of my website I've placed the following code:
<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??

hyperion

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.
&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://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)