My website is on a shared server. Having DNS issues, this seems to be the only way. I need to get the real and absolute path to my website like 99.23.154.23/~mywebscom without asking the support is this possible? With the IP address and path.
feedback
|
|
Define "absolute path". Absolute file path on the webserver? Likely If you meant URL, there is no definite URL for all servers, but if userdirs are enabled, you can access the website using
| |||
|
feedback
|
|
For the time being you can add an entry to your hosts file but you should really be working on the DNS. I don't understand how you think the path to your website is related to your DNS not resolving or how knowing it is going to help. | |||||||||
feedback
|
|
Web servers use "Host" header of requests to detect virtualhosts. So probably there isn't any path like http://ip.ad.dr.ss/~yoursite. You can add your ip address and domain to hosts file of your system and connect server using your domain. So web server will serve your virtualhost instead of default virtualhost. You can add a newline to hosts file contains ip address and domain as space seperated. e.g 1.1.1.1 mydomain.com www.mydomain.com | |||
|
feedback
|
|
If your server has PHP installed (usually all apachie servers now are php enabled) this simple PHP script will return the absolute path wherever you will place it:
Just save this on a file curdir.php and run it via URL for example www.example.com/curdir.php There are also options to retrive the IP Address, Server Name etc... with $_SERVER variable
You can see full listing of this variable and find almost everything about the server where your website is here: http://php.net/manual/en/reserved.variables.server.php | ||||
|
feedback
|
|
Copy and paste this into a .php file (path.php or something) and upload it to your server. Call it in a browser; such as http://www.yourdomainname.com/path.php et voila, your absolute path:
| |||
|
feedback
|