Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 08-05-2006, 01:17 AM
Rezo's Avatar
Rezo Rezo is offline
Senior Member
 
Join Date: 03-13-06
Location: Republic of Moldova
Posts: 256
iTrader: 0 / 0%
Arrow Search Engine Friendly Redirect - 301

A 301 redirect is executed server-side which means that the visitor is never aware that they have been redirected, there is no time delay like with javascript.

To use the following PHP code you must change the file extension of the file you will be using to index.php instead of index.html.
Now put the following code into your new index.php page, put ONLY this code, no need for <head>, <body> or any other tags.
Change www.yourname.com/page.html to the url the page will be redirecting to.



PHP Code:
CODE     
<?php
header
("HTTP/1.1 301 Moved Permanently"); 
header("Location: yourname.com"); 
exit(); 
?>
 
Reply With Quote

Advertisement

Advertisement

Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search Engine Friendly Redirect Rezo Coding Forum 11 09-27-2006 01:00 PM
Re-write Url to make website more friendly for search engine. haga SEO Forum 2 09-26-2006 12:37 AM
Search engine friendly box always displays at bottom of screen Jayesh Lodha Coding Forum 3 09-13-2006 06:10 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 02:43 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC