top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to Perform a 301 redirect with PHP?

0 votes
298 views
How to Perform a 301 redirect with PHP?
posted Jul 10, 2014 by Karamjeet Singh

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Performing a 301 re-direct with PHP is a more and more common question that has generally been asked 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.abc.com"); ?>

answer Jul 11, 2014 by Rahul Mahajan
Similar Questions
0 votes

I'm curious of a simple, common, universal way to detect a mobile user so I can redirect them to a mobile directory...

What is best for this: Javascript - CSS - PHP?

I think for my purposes if I can detect screen size or mobile browser agent - that would be good enough for what I need right now.

...