0

I want to use the skeleton of pset7 for my final project, however I can't get the index to redirect to any other page. I get this phpinfo() page, and when I try to put code in index.php to redirect the user to another page, nothing happens.

I edited /etc/hosts and added 127.0.0.1 app for lack of a better name. When I put http://app into chrome, I get the phpinfo() page.

The browser always requests index.php by default. This requires ../includes/config.php, which defines redirect(). I then call redirect("../public/foo.html"), which should bring me to that page, but it doesn't. Any code I put in index.php seems not to be running. Why is this?

How can I fix this?

1
  • You put these in a folder in vhosts, right? Does it make a difference if you use absolute paths instead of the relative paths you have above?
    – ronga
    Dec 12, 2015 at 4:59

1 Answer 1

0

It turns out I needed to put the files inside the vhosts folder. Index.php was not found when it was outside this folder.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .