Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
redirect website to another page
08-08-2007, 11:23 AM
Post: #1
redirect website to another page
can do in HTML.
- create a new html file with the below content
Code:
<html>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=new-file.html">
</head>
<body>
</body>
</html>
- save it as index.html
- upload to the folder you want to redirect to another URL

or do it in PHP
- create a new php file with the below content
Code:
<?php
header ("Location: path-to-the-file/new-file.html");
?>
- save it as index.php
- upload to the folder you want to redirect to another URL

===========================================================

Có thể lựa chọn, làm qua HTML hoặc PHP
1. Làm bằng code HTML
- tạo file có nội dung sau
Code:
<html>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=new-file.html">
</head>
<body>
</body>
</html>
- save thành file index.html
- upload vào thư mục muốn làm redirect

2. Làm bằng code PHP
- tạo file có nội dung sau
Code:
<?php
header ("Location: path-to-the-file/new-file.html");
?>
- save thành file index.php
- upload vào thư mục muốn làm redirect


Pham Hung
3inetworks staff

For official support please use our secured helpdesk at https://support.3inetwork.com

Visit this user's website Find all posts by this user
Quote this message in a reply
09-17-2007, 09:09 AM
Post: #2
Re: redirect website to another page
hoặc có thể dùng .htaccess nếu dùng trên hệ thống *nix

Code:
Redirect 301 /old-path http://point-to-new-path.com/
Find all posts by this user
Quote this message in a reply
02-11-2008, 03:54 PM
Post: #3
Re: redirect website to another page
syncpalm Wrote:hoặc có thể dùng .htaccess nếu dùng trên hệ thống *nix

Code:
Redirect 301 /old-path http://point-to-new-path.com/
Còn Windows mà cài Apache thì không được hihi :mrgreen:
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: