I have a WP multisite installation protected with a firewall service which I cannot disable. Now, I need to access a particular site within the multisite installation via IP.

I got the absolute path to the installation (/usr/www/users/multisite/site1/).

So, I have been trying to access it with the URL IP/usr/www/users/multisite/site1/ and it says the page doesn't exist (404). I also deleted one by one the directories in the URL starting with 'usr' and yet I couldn't access it.

Any suggestion on how I may be able to access the site via IP instead of the domain?

Thank you

有帮助吗?

解决方案

That's not how URLs work. If it was, the internet would be incredibly easy to hack as you could access any file in the entire file system by appending it to the servers IP.

It's also not how domains URLs and IPs work. Computers don't connect to domains, they connect to IPs, all communication is via IP.

In order to retrieve a page, you need to send the URL in a HTTP GET request in the request headers so it knows which page to load, which is exactly what already happens in the browser right now, so it will not work.

I have a WP multisite installation protected with a firewall service which I cannot disable. Now, I need to access a particular site within the multisite installation via IP.

If you don't provide a full URL, the remote server will not know what to serve, and fall back to the default, which will either be the root site in the multisite, or more likely an Nginx or Apache welcome page

protected with a firewall service which I cannot disable

I'm afraid that the solution you have devised is not going to work.

The solution, and the only solution, is to disable the firewall. It is unavoidable

许可以下: CC-BY-SA归因
scroll top