PHP URL display question.

label Programming
account_circle Unassigned
schedule 3 Days
account_balance_wallet $5

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!

Nov 30th, -0001

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

/var/www/html

to 

/var/www/html/myfolder

Jun 12th, 2013

btw, you need to restart your server once your done. :-)

Jun 12th, 2013

hmmhm, I do not want to change my webroot. let's say I have my index.php on localhost, I want to make a link on index.php that would route me to my login page and display "http://localhost/index.php?r=site/login" as my URL. :)

Jun 12th, 2013

Oh so you only want to change this sepefic link. Are you using any PHP framework?  I can definitely help you :-)

Jun 12th, 2013

Studypool's Notebank makes it easy to buy and sell old notes, study guides, reviews, etc.
Click to visit
The Notebank
...
Nov 30th, -0001
...
Nov 30th, -0001
Jun 24th, 2017
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer