Solved

Redirect a webpage?

Posted on 1998-09-25
14
550 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
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.

 
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problems with VOIP phones and Comcast Business internet connection 27 125
software inventory tools 3 65
what is mstp 6 63
Setting up a trunk port on a Cisco switch? 20 61
Let’s list some of the technologies that enable smooth teleworking. 
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

756 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