PHP Questions Home | Register | Login
Categories
Arrays
Files
Forms
Creating PDFs
PHP Errors
Functions
Images
MySQL
Numbers
Others
Strings
Website
Unanswered

PHP Forums
Forums Index
MySQL Forum
PHP Forum
Flash/Actionscript
Javascript
Web design

More PHP
PHP Functions
Top Questions
Ask a Question
PHP Interview Questions
PHP Jobs
Ecommerce
IT Questions
Business Websites

Sponsors

sponsor ad
My Salary
PHP Developer Salary
Advertise Here

How do I perform a 301 redirect with PHP?


Performing a 301 re-direct with PHP is a more and more common question people ask, due to the emphasis on making sure that ranking points aren't lost and duplicate content issues are resolved as best as is possible.

Luckily to perform a 301 permanent re-direct from one location to another is very easy with PHP, here's how:

<?php
Header
("HTTP/1.1 301 Moved Permanently" ); 
Header("Location: http://www.theothersite.com");
?>



Comment on this Question and Answer >>>

ASK A QUESTION

More website PHP Questions

I was wondering how do i make all the logs and comments go to an email account so my client does not have to keep logging in, she can get them and answer any questions via email.. Thanks

How do I send HTTP headers with PHP?

where do i go to paste my google adsense code?

Hi, I need to fetch data from a web page with PHP. The only problem that I face is that I need to log in with name and password.

How do I display todays date on my website?



Custom Search