How I can do this on html - html

I have a website and I've been searching a lot for this question and can't find anything yet.
Anyone knows how to make links take you to another folder and show the html page without page in URL? Example:
I have a html page called service.html and its on folder /service. I want a link to take me there without displaying in the URL my html file like:
click me
And it takes you to the html file and shows your content without displaying the html name in the URL. just www.example/service/ :D

Calling the file index.html instead of service.html should work, if the website is currently hosted.

You can use the method #tasteslikejava mentioned, or you can create a .htaccess in the services directory and put in the following information:
DirectoryIndex service.html

Is that what you want?
link
How to link html pages in same or different folders?

Related

How to create another html page in visual studio code?

I need to create another page for my website, because I AM DONE with my homepage, i am newer to coding, so please explain it very thouroghly and remember IM USING VISUAL STUDIO CODE thankyou anyone!
Simply add a new file at the top left corner. then give it a name of you liking and an extension that you usign like .html
Then you write that new page like you wrote the first page and add links beween both sites with the link tag.
I would say save your index.html as about.html. This way all you need to do then is edit the content. The CSS file and all other items will still be linked.
FILE > SAVE AS > about.html
Edit the content for the about page and repeat the steps for each page.
In your index.html file you can link to your about.html file like this
<a href="about.html>ABOUT US</a>
This will be the quickest way. Then you wont have to start from scratch with every page.

How can I remove file path and .html extension from my URL?

One of the pages on my website is: https://bojanstavrikj.github.io/content/articles/wunderground_scraper_original/wunderground_scraper.html
I started keeping my articles in separate folders. Obviously, once I changed that the whole path is appearing in the browser when opening the article.
What I want is to rewrite this URL as: https://bojanstavrikj.github.io/content/wunderground_scraper
As I understand this can be done with htaccess, but I cannot figure out how to do it.

Internal Links in HTML

I have a lot of internal links I want to use for the first website I'm building. It works great when I run it locally but none of the internal links work when on the actual site. For example, here is one internal link I'm using.
Read More
I understand why this doesn't work, but what link can I put there if one doesn't exist yet? I guess how do I create sub pages for my website?
Thanks in advance!
Here's simple example, You cannot use absolute path on server, but relative using .. (back to parent directory) or . (current) to link to file that you need.
If you don't have a page yet, leave it #
like Click here
You can put relative links in each page. Lets assume your site hierarchy is such:
index.html
category-a.html
category-a/page1.html
category-a/page2.html
category-b.html
category-b/page1.html
category-b/page2.html
The link from index.html to category-a.html would be:
category a
The link from category-a.html to category-a/page1.html would be:
page 1 of category a
The link from category-a/page1.html to index.html would be:
Home

How to correctly link page not folder with same name without .html extension

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 to add a HTML Home page to a prestashop page

I've developed a custom HTML homepage for my prestashop site, but it seems I do not know how to incorporate it, I've tried looking into the prestashop forums, but all it shows are for .tpl files, is there a way for me to link them to the homepage?
Can I just link it as an html page or do I really need to put it inside a tpl page for it to work?
Create your .html file (say 'test.html).
In test file you need to
add these lines of code before your html code
<?php
include(dirname(__FILE__).'/config/config.inc.php');
Tools::displayFileAsDeprecated();
include(dirname(__FILE__).'/header.php');?>
Also add these lines after your html code
<?php include(dirname(__FILE__).'/footer.php');?>
Place the test.html file in the public_html folder.
Now you need to add the page to link with your site.
If it is home page you need to add it to index.php otherwise you can just add the url (http://mysite/test.html) to menu bar or footer links, where ever you want to put it.
I have placed my php page link in the footer information part using anchor tag as shown in the image
In prestashop you can find "Home Editorial" module, in this module you can put your html obviously the module need to be transplant in displayHome position.