How can I get the current page's full URL on a Windows/IIS server?
Maybe, because you are under IIS,
$_SERVER['PATH_INFO']
is what you want, based on the URLs you used to explain.
For Apache, you'd use $_SERVER['REQUEST_URI']
.
How to reliably get the current URL in PHP?
Use $_SERVER['REQUEST_URI']
. This should give you the URL that the visitor is using.
how to get the url of the current page using php
<?php
$url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
echo $url;
?>
IIS keep some urls when changing domain
I think what you're looking for is the URL_REWRITE Extension.
You can download it here: https://www.iis.net/downloads/microsoft/url-rewrite
Then apply the rewrite rules at the server level not the application level. This will allow you to easily control the the flow of any your old URLs to your new location.
Depending on how many you have theirs a few different ways you can do it with URL_Rewrite.
To get you started here's a bunch of tutorials on how to use it: https://www.iis.net/learn/extensions/url-rewrite-module
After you play with it and if have any specific questions, just ask on stackoverflow and tag the question with URL-REWRITE-MODULE
Related Topics
Super Fast Getimagesize in PHP
Append Data to a .Json File With PHP
I Cannot Get My Login Form to Connect Interact Properly With MySQL Database
How to Check If a Word Is Contained in Another String Using PHP
Session Data Lost in Chrome Only
How to Check If a String Starts With a Specified String
How to Get Page Content Using Curl
Strtotime With Different Languages
Get Original Url Referer With PHP
How to Get Url of Current Page in PHP
How to Do Left Join in Doctrine
PHP Expression ≪≪≪Eob
PHP - Redirect and Send Data Via Post
Notice: Array to String Conversion In
What Is the Function _Construct Used For