Object moved this document may be found here php

4.5k views Asked by At

I'm redirecting my web page to another url. It works fine on localhost but when i host it to my web server then it give me the message which says "Object Moved This document may be found here". I don't know what is the issue here is my code.

foreach($html->find('a[class=btn btn-warning btn-block]') as $element) 
      $redic=$element->href;
       header("Location: $redic");

please help me what should i do to avoid this error. Thank you

1

There are 1 answers

0
Zarif On

Your path must not be absolute! pathname that starts from the root path and specifies all directories between the root path and the specified directory or file.