I have a question regarding the working of pset7. I have completed it but now I am scratching my head for this question.

When I run my apache50 server like :

apache50 start ~/workspace/pset7/public

Why does the https://ide50-username.cs50.io/login.php page open up? There are many other options like //ide50-username.cs50.io/index.php OR //ide50-username.cs50.io/history.php But Why not any other PHP file because there are many PHP files lying there? Why just this file only?

  • As you have completed the Pset7, can you please help me. How you got through the 403 forbidden problem. did you also encountered that? if yes, how did you solved that? if no. can you please tell me all the chmod steps you executed. – Vinz.R Aug 12 '16 at 15:50
  • @Vinz.R: Hope you have solved your "403 Forbidden" problem by now. Just in case you haven't, you may want to read my Definitive Guide to 403 Forbidden / permissions / chmod on the CS50 Reddit. – hotwebmatter Sep 11 '16 at 17:09

From the pset instructions:

Know that index.php is the file that’s loaded by default when you visit a URL like https://ide50-username.cs50.io/.

...which calls (redirects to) login.php (via config.php) if empty($_SESSION["id"]), which presumably it is when first called.

Recall from the implemention of indexes() in pset6's server, how index.php or index.html are presented as the default (landing) page. The implementation in apache2 is much different, the gist is the same. An internet search for "apache landing page" would give you more technical information on the topic. Or the configuration doc from apache.

You must log in to answer this question.

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