how to redirect html into a url - web

I am not sure if this is possible.
This is the name of the site:
www.mysite.com
and I created an html (named index.html) & saved it to the folder myfile which is a redirect to this site www.mysite.com/myfile
Now on the site, I have a content here that if you click on it, it will direct you to this:
www.mysite.com/documentation
Now the redirect html I made, I would like it to be redirected to the documentation
so that if you click on www.mysite.com/myfile - it will open the www.mysite.com/documentation but this documentation is not an html its inside the cms.
Is that possible?
Btw here is the html code I saved in the index.html. Do I have to insert the url here:
www.mysite.com/documentation?
CONSTRUCTION PAGE

Is this what you need?
<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.mysite.com/documentation">
I have trouble understanding your question correctly. So I am unsure if this will help you.
Edit for valid html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Redirect</title>
<meta http-equiv="REFRESH" content="0; url=http://www.mysite.com/documentation" />
</head>
<body>
</body>
</html>

Use document type weblink on modx

As Gus suggested, use a weblink.
Create a new weblink with alias myfile, and the content should be a link to www.mysite.com/documentation.
Then if you visit www.mysite.com/myfile it will take you directly to www.mysite.com/documentation.
For more info: http://rtfm.modx.com/display/revolution20/Weblink

As the others have already said, a weblink in modX would be the way to go.
I answered this already in more detail in your other question with essentially the same topic.

Related

Single page with Astro and Netlify CMS

I’m trying to create a Single page with astro and netlify cms, in which the admin should be able to add/remove/modify the page through /admin, but I’m struggling with the understanding of the folder structure.
So, as far as I know, I need to specify the collection structure in the config.yml file. Something like this. (see attached file)
Which will create a content.md file. Basically it will contain all the info that was created through /admin.
The problem is that I don’t know how and where this content.md file is used. Should I import it manually in the index.astro file or am I wrong?
Thank you in advance 🙂
If you have a Markdown file at src/content/content.md, you will need to import and render it somewhere. It depends which page you want to display this content on, but if you want to show the content on your homepage, this would be src/pages/index.astro.
Here’s an example:
---
// src/pages/index.astro
import { Content, frontmatter } from '../content/content.md';
---
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My homepage</title>
</head>
<body>
<h1>{frontmatter.title}</h1>
<article>
<Content /> <!-- this will render your Markdown body -->
</article>
</body>
</html>
The key things to note here are:
The use of the <Content /> component to render the main Markdown content of your Markdown file
The use of an expression {frontmatter.title} to access the title field from your Netlify CMS config. Other fields would be available in the same way: {frontmatter.description}, {frontmatter.heroImage} etc.

Kentico - different DOCTYPE on different pages

I've just realized that some of my pages have a long DOCTYPE, but most pages have the short DOCTYPE like below. I never add this details myself and in all my Master Pages, I don't see/add the DOCTYPE details. My question is how the DOCTYPE got added and how to make all pages use the same short DOCTYPE. I believe the long DOCTYPE may be the cause to mess up some of my navigation for mobile. Thanks for your input!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<!DOCTYPE html>
<html >
The DOCTYPE is set in the main portal template when using the PortalEngine in Kentico with the code <%=DocType%>. This value comes from the Master page tab inside the Pages application. You can see an example of this on the Creating the master page tutorial in the Kentico documentation.
It's the first field on the tab that you can edit, so you should just be able to set the value to <!DOCTYPE html>.
As far as I am aware, each page that has a master page can specify its own document type, so check out each of your master pages. I think if you check out the link about, this will help you out.
It's also worth checking that no-one has edited the file CMSPages\PortalTemplate.aspx (this is the base for PortalEngine pages). For reference, the beginning of the file normally looks as follows (in Kentico 10):
<%# Page Language="C#" AutoEventWireup="true" Inherits="CMSPages_PortalTemplate"
ValidateRequest="false" MaintainScrollPositionOnPostback="true" EnableEventValidation="false"
Codebehind="PortalTemplate.aspx.cs" %>
<%=DocType%>
<html <%=XHtmlNameSpace%> <%=XmlNamespace%>>
To add to what Matt has said, if your not using Portal method then the changes could be in several different aspx files in the CMSTemplates directory. These templates would have that namespace defined in them if they were a master page template.
<!DOCTYPE html>
add above doctype in very first line of your master page.
refer below link.
https://docs.kentico.com/k9tutorial/creating-the-master-page
hopes it will help

How to show full page URL of welcome file in address bar

I have "/pages/index.xhtml" page. The problem is when i run the application, this index page name doesn't appears at address bar.
It only shows http://localhost:8080/myApplication/. What I want to see is http://localhost:8080/myApplication/pages/index.xhtml
Is there any solution?
here is my welcome file from web.xml
<welcome-file-list>
<welcome-file>pages/index.xhtml</welcome-file>
</welcome-file-list>
You need to send a redirect from / to /pages/index.xhtml. Easiest is to use a real index file with a meta refresh header for this.
First create a /index.xhtml file as follows:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Dummy homepage</title>
<meta http-equiv="refresh" content="0; url=pages/index.xhtml" />
</head>
</html>
Then change your <welcome-file> as follows:
<welcome-file>index.xhtml</welcome-file>
This also instantly fixes your bad way of using <welcome-file>. It's not supposed to specify the "home page", but it's supposed to specify the folder's own file which needs to be served when a folder such as / or /foo/ is requested in URL instead of a file.
See also
How to use a sub-folder as web.xml welcome directory
why do i get the protected page instead of the login page?

How to modify the HTML tag in Drupal 6?

I am new to Drupal and I need to add an attribute to the HTML tag, but I cannot find the way. Thank you for the help.
This probably depends in part on your theming mechanism. However, the doctype and html tags are likely hard-coded in page.tpl.php or similar (located in sites/all/themes/themename). The exact file will depend on your theme.
For example, I have a site with the following in page.tpl.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language; ?>" lang="<?php print $language->language; ?>" dir="<?php print $language->dir; ?>">
As you can see, there is some information being injected by PHP. This would be the place for you to make your change.

Cant find appropriate doctype, only seems to work in quirks mode

For some reason my web page seems to work fine without a doctype, but doesnt if I specify any in full.
I have gone through various different templates without any success, i.e. code validators then dont like my code and/or it doesnt work.
The only thing "I get away with" is the top line below, but even then I cant specify any details, i.e. its just the beginning of the usual doctype declaration.
The page is the result of Drop down Stackoverflow question.
Also (and the reason why I want to specify type since this may be causing the problems) the page only fully works in IE. It only loads the first drop down in Chrome and doesnt load any in firefox.
I appreciate that above isnt overly clear, but the code is very short, so am hoping if pointed in the right direction I can complete it myself and/or describe other issues better.
<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>User Interface</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="dropdown.js"></script>
<html>
<body onload="show_results('','Type1')">
<form name="MainForm">
League:
<span id="FirstList"><b>First List.</b></span>
Team: <span id="SecondList"><b>Loading second list, please wait.</b></span>
<input type="button" value="Button1" onclick="show_results(form.select_second.value,'Type3');" />
<input type="button" value="Button2" onclick="show_results(form.select_first.value,'Type4');" />
Output: <span id="OutputTable"><b>Output table space holder.</b></span>
</form>
</body>
</html>
Managed to solve it myself, even with strict type
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
was perfectly fine after tidying up everything.

Resources