On the server side, you might be able to access the REQUEST_URI environment variable, which should be always valid.
On the server side, you might be able to access the REQUEST_URI environment variable, which should be always valid.
Thanks but I only have access to the client side of things though... I'm logging the URL of multiple websites that I have no control over..
Beyond that... you should not care.
The problem though is that the application I feed the URLs into does care (it seems to be able to determine the actual URL) and throws error if they don't match.
The problem I'm having is more to do with how the server/browser handles slashes (adds or removes them without me seeing) and being able to determine whether a change has happened so I'm using the `correct` value in my database.
But this method doesn't work on my tests for the host main page URL..
If I remove slash and visit https://www.gov.uk I don't get redirects to https://www.gov.uk/
The application I feed these URLs into acts like a browser (in fact it is a form of browser) and it waits for internal redirects to happen e.g. (slashes added/removed), so it needs to be using `correct` values for further tests to work e.g. confirming database URL is `correct`.
So I guess I'm looking for component that tracks internal redirects?
There is no such thing as an "internal redirect". Either the server redirects or it does not. That is an explicit response.But there is URL validation and that can work in a similar way.