Using atom code editor I have a folder "login". I also have a subfolder "register".
I can access the login.html in my browser from a button on the index.html. However, once I am on the login.html, I can not get to register.html
Once I try to access the register page from a button on my login page in my browser I am given the following:
/myproject/Login/Login/Register/register.html
If I remove one of the /login I am given the page I want. Not sure why my file path is not directly working from the button on my login.html
<a class="txt2" href="Login/Register/register.html">
I had to change to
<a class="txt2" href="../Login/Register/register.html">
Related
Maybe really dumb question but I'm building my first site
http://iservis.info/
Im trying to build classic URL structure
I have single page "Opravy" where all devices are listed and if you clicked on certain one i want to have URL "http://iservis.info/opravy/iphone-xs-max.
So on server i have a file "opravy.html" for main page and folder "Opravy" with all sub-pages with certain devices.
enter image description here
I also have .htaccess for all .html extensions
But problem is that in nav-bar I have nav-link "Opravy" and my code is like this
<a href="opravy" class="nav-menu-link--block desktop-only w-inline-block">
But its showing error because I think its trying to link the folder and not the "opravy.html" page.
So how do I link the "opravy.html" page to nav-link but without showing .html in URL ?
Thanks a lot
Maybe use directory structure + index.html? Each index.html is rendered at the corresponding url that matches the directory structure. Something like this:
/
index.html
/../opravy
index.html
/../../iphone-xs-max
index.html
How do I set up a link button in html?
I want to set a button from the homepage so that user may be viewed by a log in screen. I have two index.html files, one for the homepage, and one for the login screen. How do I set it so when users click on log in they will be presented with the login screen.
I tried <li>Sign Up/lOG IN</li>.
My goal was to use href= location of index.html.
When I click the link it takes me to an error page. The top link would be the address to the index file that has the login html.
You don't have .html on your url. Try:
<li>Sign Up/lOG IN</li>
Also, you are using a relative link, so the position of the file where you have this link is important. Right now it will look one directory up for a file named index.html. If the file with the link is foo.html make sure in the same folder you have a folder named login that has a file named index.html.
I've just got my website up and when I only type in the domain I get an Index of all the files that I've uploaded, but I want it to load my HTML page when it gets loaded as www.domain.com/domain.html instead I want it to be www.domain.com.
How do I do this? Do I have to contact my hosters or can I do this in the project?
As long as the web server doesn't use wacky configuration, you can just name the main file "index.html" and it will be the main access point to your domain.
Please keep index.html file in top level directory of application. If you do not have index.html file then add new file in top level directory and redirect it using onLoad function to your website home page.
All you have to do is to rename domain.html to index.html and it will be displayed automatically when the site loads.
That is the main page you wish to display when someone visits www.domain.com should be named index.html if it is an html page, if not you use the correct file extension.
A way to keep using domain.html as the main source file. Create an index.html file and add the following code in it.
<script>
setTimeout(function(){
window.location='domain.html';
}, 5000);
</script>
I am having trouble linking from a subfolder index file back to my root folder index file.
I have a logo in the nav bar of example.com/blog that I would like to have link back to example.com
I have tested various linking options for the logo image including
<a href="../index.html">
<a href="http://www.example.com">
<a href="../">
And none of them seem to work. The logo image continues to link to example.com/blog/index.html
The strange thing is that if I right click on the image and then select open in a new window/tab, then it will load example.com just fine.
I am at a complete loss.
Could this be something related to my .htaccess file?
Additional Info
I added a "Home" text link to the nav bar using the below syntax and it works perfectly.
Home
The image for some reason will not link back to the rootfolder index.html file using the same syntax. It keeps loading http://www.example.com/blog/index.html
Try using a javascript redirect
function home() {
window.location.replace("http://example.com");
}
<button onclick="home()">hi</button>
Replace http://example.com with your website.
Say I have a link like this on public_html/index.html:
Link to picture
Since the "link to picture" has its own folder and uses index.html, normally that extension would be hidden if I type in "www.mywebsite.com/pictures". But if I first go to "www.mywebsite.com", then click that link, it would display in the address bar as "www.mywebsite.com/pictures/index.html". How would I hide the "index.html" in links? I've tried this but it doesn't work:
Link to picture <---this simply opens the file directory
Thanks.
Add the following to your httpd.conf file:
DirectoryIndex index.html
And by default if you don't pass in a filename index.html gets rendered instead of the directory content