Solved

Redirect a webpage?

Posted on 1998-09-25
14
558 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

636 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