Recently, i transfer from localhost with xampp to online host using cloud hosting. But then I encounter some error related to the direction of a file. For example, when using in localhost, the URL for directing from the homepage to login: localhost/login. But when I using in the cloud hosting it then become domain.name.com/homepage/login. This lead to the 404 error. The html code for the file is the same when using in localhost and cloud hosting.
<a href="login.html" class="navbar-item ">Login</a>
It is better to give the path from the current file location.
Like you can access the files in the same folder using file.php
You can access the files in another folder using folder_name/file.php
You can access the files in parent folder using ../file.php
Thank you
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.