Removing a / from the address bar? [duplicate] - html

This question already has answers here:
Removing trailing slash from ALL URLs in site
(3 answers)
Closed 8 years ago.
I've always seen this on websites but I've never actually known how to do it. If the title is unclear then here is what I mean.
http://domain.com/directory/
I want to change that into:
http://domain.com/directory
I've seen other websites do it and I just wondered how I would go about doing that. Not even sure if this is the correct place to be posting this but I have no idea. If I am posting in the wrong place then please direct me to somewhere else. Thank you.

It is good for the SEO and it will set default to the root of your domain on the server where you have uploaded the web pages. It is something you don't need to worry about. It pretty much gets the search engines to look at all the files and not just the index.html file

Related

Is it possible to share a website without hosting it? [duplicate]

This question already has answers here:
Is there anyway to render a website and share it without hosting it?
(2 answers)
Closed 1 year ago.
So recently I started a project to expand my knowledge when it comes to HTML and CSS. I made a little website just for myself and I want to get some feedback from my friend.
I want him to be able to maybe click on a link and then get to my website (doesn't have to be a link). So I don't want to publish the website for anyone but for my friend or anyone that has that link or something like that.
I already heard about sharing files to someone on OneDrive and including all the code in it but my OneDrive is already out of storage so something different would be nice.
It is best to use pages.github.com check the page is a small post and video tutorial on how to use it, greetings bro!

Simply transfer HTML code into other HTML files [duplicate]

This question already has answers here:
Multiple webpages with common title and navigation bars
(4 answers)
Closed 2 years ago.
I would like to start a homepage for me. Every time I add a thing to index.html I have to add it to the links (in about.html etc.) as well.
How can I simplify that, that the new things of the index.html are automatically transferred directly into the other links (about.html etc.)?
Thanks for the help
The solution I used was to create a JS script that you would include in your HTML, that would add the HTML you want to the document :
let body = document.getElementsByTagName("body")[0];
body.insertAdjacentHTML("beforeend", "your html");
You could then put this script where you want to include the HTML.
I don't know if it's the best solution, but it works.
Right now, using vanilla HTML, there is no quick, easy, and simple way to do this. Using a backend framework like Django, this is easy, but that is really complicated and takes a while to learn!

ID # reference without index.html [duplicate]

This question already has answers here:
Reference: mod_rewrite, URL rewriting and "pretty links" explained
(5 answers)
Closed 5 years ago.
long time lurker first time signup and poster.
quiet simple really
how do i reference from the navigation page/index.html#id to just page#id
- so i dont want it to show index.html
ie.
ww.page1.com/pasture#clover
i am currently using the codes below, and dont mind if i need to put in some other code. the pages will be in .php later on but for now in html.
I am using the below codes
Clover
from the navigation on the first page/all pages
<h3 id="clover">Clover</h3>
and this on the target page
What you want: Anchors (or Bookmarks)
Look here: https://www.w3schools.com/html/html_links.asp
So: Use Clover
Also: If you call the site as www.abc.de/index.html#123, then it will stay as it is - and give you www.abc.de/index.html#clover.
If you call the site as www.abc.de/#123, then it will also stay as it is - and give you www.abc.de/#clover.
Edit: I misunderstood the OP. I may edit this post later. Sorry.

How to let robots parse our custom html elements? [duplicate]

This question already has answers here:
How do search engines deal with AngularJS applications?
(15 answers)
Closed 6 years ago.
I have a website containing custom elements (i use angular 2), and google fails to parse them correctly :
It only sees
<my-app></my-app>
It seems that the value of this component is not retrieved at all by google robots.
Is there a best practice / workaround ?
Thanks for your help.
This has been asked a million times. Please refer to this question and this specific page by google.
Times have changed. Today, as long as you're not blocking Googlebot from crawling your JavaScript or CSS files, we are generally able to render and understand your web pages like modern browsers. To reflect this improvement, we recently updated our technical Webmaster Guidelines to recommend against disallowing Googlebot from crawling your site's CSS or JS files.
What you can do is getting the HTML of your rendered page and inserting it into the <my-app></my-app> tags without user information or the like.
This will get replaced anyway after Angular has booted up, this means you can even put something completely different in there.

Images in a mySQL database [duplicate]

This question already has answers here:
Storing Images in DB - Yea or Nay?
(56 answers)
Closed 8 years ago.
I'm making a website for my brother's webcomic, which was previously hosted on Tumblr. What is the most efficient/logical option for storing the pictures?
Downloading and putting the path in the Db
Storing them in the database, base64-encoded
linking directly to the pictures on Tumblr
wat do?
If the tumblr site is going to remain active I would lean towards using the Tumblr API to get at the photos. You could then just write some javascript/jquery functions to display the images however you want.
I've done something similar in the past with Google Picasa Albums and it worked out pretty well.
http://www.tumblr.com/docs/en/api/v2#photo-posts
Just a little additional info, in the past I've found using jquery plugins sometimes makes it a bit mor simple to get at the data I'm looking for.
Never used this one in particular but just a quick search and found this as an example of one that might be helpful.
https://github.com/Iaaan/jQuery-plugin-for-Tumblr-API