Path to home page not working, html - public-html

How should i arrange my public_html or fix the code so people can click HOME ad go back to the main page without me including each html in the same place as the index.html, i.e, all my inner pages like "reviews" "news" "contact" are al together in along the index.html, and i have read that i shou8ld keep my "reviews" "news" "contact" on a single foler for each, but it seems my code is not working, what should be the correct code so i dont have to put all the .html files on the same place as index.html?

Try to use base html tag
<html>
<head>
<base href="http://www.w3schools.com/images/" target="_blank">
</head>
<body>
<img src="stickman.gif" width="24"height="39" alt="Stickman">
<a href="http://www.w3schools.com">W3Schools</a>
http://www.allsolution24.com.bd/webdesign/tutorial/tags/tag_base.html

Related

How to use HeadContent to replace meta tags in Blazor Wasm not-hosted

I'm on .NET6 and I have a Blazor Wasm application that is hosted as an Azure Static Website.
I understand how to add meta tags like description and keywords using
<PageTitle>Index</PageTitle>
<HeadContent>
<meta name="description" content="Blazor WASM index page.">
</HeadContent>
But I want to add the needed meta tags to index.html and let the component overwrite them.
Now the component is adding them. Resulting in duplicate meta tags.
This line in my Program.cs is responsible for that:
builder.RootComponents.Add<HeadOutlet>("head::after");
The documentation says it will add the meta tags at the end, which it does. How to make it replace any existing meta tags?
The reason I want this is so every page will at least have a full set of meta tags and I assume it is also better for SEO.
I found that the <HeadContent> will only overwrite tags in other <HeadContent> components, it will not overwrite tags in the index.html <head>

how to dynamically rewrite the url?

original url
http://wwww.mydomain.com/image.php?id=13&cat=4&type=3$date=2011-03-14
i want to modify this dynamic url to something like this
http://www.mydomain.com/imageid/imagetitle (no php/html extension at the end )
plz if someone could help me in this , i have tried several online generators but my modification is little different.
I don't know how to write mods .
well, to get it you could need a page that redirects you to another location.
in the head section of your html page you have to specify a meta tag like it:
<meta http-equiv="refresh" content="0; http://www.mydomain.com/imageid/imagetitle" />
when you land on that page, it counts to seconds you specified in the first argument of content (in this case 0 seconds) and opens the new page passed as the second parameter.
a easy thing you could do to avoid extensions to be visible on the address bar of your browser is to create a folder in your web server (in your case "imagetitle") and put inside it an index page for example "index.html" which is the page loaded by default when a user aims to that link

Not to follow the links on page

Please suggest me, By writing <meta name="robots" content="nofollow">in the submaster page will include the links of master page or not? Thanks.
example.com/master-page/sub-master-page
AND
example.com/master-page
These both are two different URLs therefore no-following links on one page will not effect the links on the other page.
You will have to include the no-follow meta tags on both the pages separately to make external links no-follow on both the pages:
<meta name="robots" content="nofollow"/>
Every page identified by a unique URL is unique and crawlers index each URL separately. Considering this fact and logic, your meta tag on sub page will not affect the parent page.

Saving HTML from WebView to existing file in Documents Directory

I have been working on some code that loads and saves HTML files. I have been able to create them, but after they are edited in the WebView, I need to save an HTML file from the webView back to the documents directory. I am not sure how to create the HTML file however. I would appreciate your help. I have the document file path and title.
The only way I can think of doing this is with javascript to pull out the html. For example if you have a reference to your UIWebView object called webView the following would return a string containing the inner html:
[bodyView stringByEvaluatingJavaScriptFromString:#"document.body.innerHTML"]);
You could then dress it back up to a complete html page, the javascript will only return the content within the <body> tags. Presumably within your code that loads and then edits the html page you can know, and therefore store, any specific information that occurred outside of the <body> tags such that you can restore it?

Use search engine meta tag outside of the <head> section

I'm using a meta tag to restrict access to specific parts of a website. The problem is that I'm using a CMS and I can only insert the <meta> tag inside the <body>, because the <head> sections is part of the universally used main template. Dose the <meta> tag still work outside the <head> section?
You can accomplish the same effect as that meta tag using an HTTP header. The X-Robots-Tag can be set in an .htaccess file and will do the exact same thing as the meta tag. If your CMS doesn't support it you can always add it manually and it won't be affected by the CMS creates pages at all.