You can try
<a href="<?php echo $_SERVER['SERVER_NAME']; ?>/index.php?'>
Or you can edit the host file and add http://my.domain/
and point it to localhost
Vra
Consider:
"if you do want to change your password, simply click:
<a href="http://localhost:8888/index.php?'.http_build_query (array_merge($_GET, array ('action'=>'checkcredentials', 'reset_term' => $term)))..."
Now consider:
"if you do want to change your password, simply click:
<a href="http://my.domain/index.php?'.http_build_query (array_merge($_GET, array ('action'=>'checkcredentials', 'reset_term' => $term)))..."
What I would like to do is replace the localhost:8888
part of the example with some magic that will determine whether the script should point to localhost:8888
or my.domain
. I deploy the application on AWS, although I have a domain pointed at my AWS instance, and I develop and test on my local machine (hence localhost
).
In summary, what do I need to replace localhost:8888
with that will determine itself where to point the URL?
Oplossing
You can try
<a href="<?php echo $_SERVER['SERVER_NAME']; ?>/index.php?'>
Or you can edit the host file and add http://my.domain/
and point it to localhost