Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 572
  • Last Modified:

Redirect a webpage?

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?
1 Solution
serveral ways to do it, one is use javascript, but you should changed the html file in your oringinal site. following is an example:

<title> test page </title>
<script language="JavaScript">
MaDdUCKAuthor Commented:
nope, I do not want any Java or the like. Just a pure UNIX function not even involving any HTML.
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

MaDdUCKAuthor Commented:
Read my question please ... no meta redirects!
what you want is not possible
MaDdUCKAuthor Commented:
are you sure? I know people who have a feature like this with their accounts. Do you have to contact the webmaster?
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:



Make sure there is no blank line in front of "Location" and at least two blank lines after the line.
MaDdUCKAuthor Commented:
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?
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).
MaDdUCKAuthor Commented:
I am not changing ISP's, all I want is to use a different ISP, but keep this current address as an entry point.
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

MaDdUCKAuthor Commented:
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.
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 

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)

MaDdUCKAuthor Commented:
whoa, worked!!!
thanks a bunch!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now