PHP URL display question.

Question Description

I don’t know how to handle this Programming question and need guidance.

How can I write a simple PHP script that would display "http://localhost/index.php?r=site/login" instead of "http://localhost/myfolder/anotherfolder/login.php"? Please help..

Thanks a lot!

Student has agreed that all tutoring, explanations, and answers provided by the tutor will be used to help in the learning process and in accordance with Studypool's honor code & terms of service.

Final Answer

Hi, you have to change your webroot in the httpd.conf file. Are you using Apache? If so, let me know if you are using EC2 or other service. You need to find the file called "httpd.conf" in your server.

Search webroot in the file. Change it from




henry (1070)
University of Virginia

I was on a very tight deadline but thanks to Studypool I was able to deliver my assignment on time.

The tutor was pretty knowledgeable, efficient and polite. Great service!

I did not know how to approach this question, Studypool helped me a lot.


Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors