So I have all my HTML, CSS, and JS files ready to be uploaded to a server (Using cPanel as I have experience with them). But i was wondering how to assign a HTML file to a certain link like “devwebdevelopment.com/about” or something like that
What I want is to have a link with a “/”. For ex. “google.com/developers”
2
Answers
Webservers are very similar to windows folders in a windows PC.
For example, think of http://www.google.com as a folder called “home”. In this “home” folder, this is your root directory, where you serve the index.html for the home page.
Now in your case, the “www.google.com/developer” is created doing… you guessed it, creating another folder in your “home” directory.
Example: in your root directory of “home” (in web servers this is called the public I believe), just create another folder called “developer”. Now your website is structured as:
http://www.mywebsite.com and http://www.mywebsite.com/developer
In your developer, create an “index.html” file, which will be the first file served to the client upon initial http request.
You need to create a directory with the desired name.
Let’s say you want to add a / contact
For this, just follow this directory structure
index.html
contact (this is a folder)
gallery (this is another folder)
And play the files for each folder. If my answer does not help you, comment here so I can help you.