|
Posted by Zenobia on November 10, 2004, 1:04 pm
Please log in for more thread options
The browser goes to
"DIR_A/index.html"
but I want it redirected to to:
"DIR_B/topic/index.html"
What do I put in "DIR_A/index.html" to make it so ?
Here is my code and it does not work. What am I doing wrong ? I
just get a blank white page.
I've tried
top.location.href="./../DIR_B/topic/index.html";
and
<body onload="doInit()"?
instead, but no joy either.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<script language="javascript">
<!--
window.onload=doInit
function doInit(){
location.href="./../DIR_B/topic/index.html";
}
//-->
<title>Page B index</title>
</head>
<body bgcolor="#ffffff">
</body>
</html>
|
|
Posted by Mark Tranchant on November 10, 2004, 1:11 pm
Please log in for more thread options
Zenobia wrote:
> The browser goes to
> "DIR_A/index.html"
>
> but I want it redirected to to:
> "DIR_B/topic/index.html"
>
> What do I put in "DIR_A/index.html" to make it so ?
You don't. You need to configure the server to do a redirect. If the
server is Apache and you are allowed to write .htaccess files, use this
in DIR_A/.htaccess (all one line, may wrap here):
Redirect permanent index.html http://www.example.com/DIR_B/topic/index.html
If you are talking about a non-served site (on a CD, for example, and
therefore off topic here), look up "meta refresh" for a horrible way to
do it.
--
Mark.
http://tranchant.plus.com/
|
|
Posted by Zenobia on November 10, 2004, 1:41 pm
Please log in for more thread options On Wed, 10 Nov 2004 12:11:56 +0000, Mark Tranchant
>Zenobia wrote:
>> The browser goes to
>> "DIR_A/index.html"
>>
>> but I want it redirected to to:
>> "DIR_B/topic/index.html"
>>
>> What do I put in "DIR_A/index.html" to make it so ?
>
>You don't. You need to configure the server to do a redirect. If the
>server is Apache and you are allowed to write .htaccess files, use this
>in DIR_A/.htaccess (all one line, may wrap here):
>
>Redirect permanent index.html http://www.example.com/DIR_B/topic/index.html >
>If you are talking about a non-served site (on a CD, for example, and
>therefore off topic here), look up "meta refresh" for a horrible way to
>do it.
Thanks, that horrible way worked. It is a page on an intranet -
not the web. If html intranet pages are off-topic here then
which group is on topic for such pages?
|
| Similar Threads | Posted | | how to load a different image on a web page | February 5, 2007, 12:09 pm |
| Troubleshooting page load delays: Whats the best approach? Software? | July 26, 2006, 3:15 pm |
| How to make a web page getting refreshed automatically | July 20, 2004, 3:51 am |
| Automatically changing the hue of a jpg in html page | August 11, 2004, 9:43 pm |
| Can I specify that some images load before others? | December 1, 2005, 6:41 am |
| wget -p does not load my images | October 25, 2006, 11:52 am |
| Impact of images on load performance | November 29, 2004, 2:49 pm |
| Textarea style not applied on first load | November 22, 2007, 4:29 pm |
| Can HTML automatically pick up JPGs? | September 12, 2004, 1:16 pm |
| automatically create multiple web pages | April 23, 2008, 12:48 pm |
|