Solved

Redirect a webpage?

Posted on 1998-09-25
14
542 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
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!

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Set up wireless network on Cisco ASA 5505 with DHCP 13 63
network error 8 48
Why does my public IP keep changing? 6 63
E-mail delayed during DNS server reboot 8 36
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 guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

776 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