+ Reply to Thread
Results 1 to 3 of 3

Thread: How to add 301 redirects in PHP?

  1. #1

  2. #2
    Hosting Master Mahwish is on a distinguished road
    Join Date
    Jan 2018
    Location
    Pakistan
    Posts
    193
    In PHP, 301 redirects can be implemented by:
    <?
    Header(“HTTP/1.1 301 Moved Permanently”);
    Header(“Location: yourdomainlink”);
    ?>

  3. #3
    Web Hosting Expert RepriseH is on a distinguished road
    Join Date
    Jul 2017
    Location
    India
    Posts
    469
    301 redirect is the most efficient and Search Engine Friendly method for webpage redirection. It's not that hard to implement and it should preserve your search engine rankings for that particular page. If you have to change file names or move pages around, it's the safest option. The code "301" is interpreted as "moved permanently".
    Cheap VPS | $1 VPS Hosting
    Cheap Dedicated Servers | Dedicated Servers starting from $29/MO

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts