I have web application. i am using WAMP server.
I have developed web application and put my application files under "login" and then in "www" folder of wamp.i.e. Drive:\wamp\www\login\
now when upload my file to the web host that goes directly to "www" folder and there is no "login" folder there. so my existing links on localhost e.g.
http://localhost:8081/login/dashboard.php
turning to http://example.com/login/dashboard.php
.
now as there is no login folder, because of wrong path, link is breaking.
there is one way, that i change every link everytime before uploading to webserver, which is time consuming and prone to errors.
is there any simple way i.e. dynamic way that my links work perfect both on localhost as well as web server.
so that the link on localhost on web server the link should be http://localhost:8081/login/dashboard.php
direct automatically to http://example.com/dashboard.php
instead of http://example.com/login/dashboard.php
i tried using $_SERVER["DOCUMENT_ROOT"] but it point local drive path and did not work well for me.. any help really appreciated.