Solved

Redirect a webpage?

Posted on 1998-09-25
14
546 Views
Last Modified: 2013-12-23
I have an account on a UNIX web server which allows me to store my webpage. However, I would like my webpage to reside with another provider and would hence like to set up a redirect to the new server. My sysadmin is out of town so I cannot ask him, and I do not want to create on of those 'You are being forwarded' client pull (meta redirect) pages. Since UNIX features such files as .forward and .htaccess I am wondering if there is a way--a file or a setting--which I can create/specify from my account in order to redirect browser by default (ie by sending a Location: %url% header to the browser).

Any ideas?
0
Comment
Question by:MaDdUCK
14 Comments
 
LVL 3

Expert Comment

by:zhongbing
ID: 1582373
serveral ways to do it, one is use javascript, but you should changed the html file in your oringinal site. following is an example:

HTML>
<title> test page </title>
<head>
<script language="JavaScript">
window.location="http://newsite/newhtml.html";
</script>
</head>
<body>
5555555555555555
</body>
</HTML>
0
 
LVL 8

Author Comment

by:MaDdUCK
ID: 1582374
nope, I do not want any Java or the like. Just a pure UNIX function not even involving any HTML.
0
 

Expert Comment

by:bjornh
ID: 1582375
<META HTTP-EQUIV="REFRESH" CONTENT="0;URL=http://www.domain.com/yourpage">
0
Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

 
LVL 8

Author Comment

by:MaDdUCK
ID: 1582376
Read my question please ... no meta redirects!
0
 

Expert Comment

by:bjornh
ID: 1582377
what you want is not possible
0
 
LVL 8

Author Comment

by:MaDdUCK
ID: 1582378
are you sure? I know people who have a feature like this with their accounts. Do you have to contact the webmaster?
0
 
LVL 2

Expert Comment

by:squint
ID: 1582379
If you only need to redirect specific pages, *and* your admin had set up the server to allow .htaccess files...

In your .htaccess:

AddHandler send-as-is .html

----------

In your index.html:

Location: http://www.newserver.com

----------

Make sure there is no blank line in front of "Location" and at least two blank lines after the line.
0
 
LVL 8

Author Comment

by:MaDdUCK
ID: 1582380
I operate two accounts, one on linux, one on unix. the linux one now offers me to dowload ~madduck (my home dir) when I access it with IE, the unix one gives an internal server error. Both servers allow .htaccess...what am I doing wrong?
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1582381
If you change ISP, you also change your domain, means that the new FQDN is different to the previous one.
If you don't want a redirect-page on your old side, the only way is to tell the client to use the new domain.

If you would like to program, IP packets know a "ICMP redirect"
which is exactly what you need, but unfortunately this mechanism will be rejected by most servers (because of vulnerability).
0
 
LVL 8

Author Comment

by:MaDdUCK
ID: 1582382
I am not changing ISP's, all I want is to use a different ISP, but keep this current address as an entry point.
0
 
LVL 5

Expert Comment

by:tfabian
ID: 1582383
it depends on the server software, but generally, it's not something that's under the control of a user..  

you can use the meta redirect described above, or you can use a perl script to redirect, or you can have your admin update the redirect file in the server configuration..


good luck



0
 
LVL 8

Author Comment

by:MaDdUCK
ID: 1582384
I do not want
(a) use meta redirect
(b) use perl or CGIs (no access)
(c) contact my webmaster

htaccess files should be under the user's control. squint is pretty much on track, so now I gotta figure out why it does not work.
0
 
LVL 1

Accepted Solution

by:
Strange earned 50 total points
ID: 1582385
If your WEB-server is Apache then you can try thic command in
htaccess file in your public html (~home) directory
Redirect [status] url-path url
for example:
Redirect /~madduck http://yor.new.www/ 

But your webmaster can disallow you to use such commands
In these case you better do that, what you dont wont to.

Oh, the status is:
permanent - Returns a permanent redirect status (301)
temp - Returns a temporary redirect status (302).
seeother - Returns a "See Other" status (303)
gone - Returns a "Gone" status (410)

0
 
LVL 8

Author Comment

by:MaDdUCK
ID: 1582386
whoa, worked!!!
thanks a bunch!
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question