Classic to Modern site redirect page

Copper Contributor

Hello all,

New to the forum so I hope I got this in the correct location.  Were starting a migration to SPO from Classic SP2016 on premise.  Most everything is a redesign due to the modern page layouts and seem straight-forward except for a redirect page we currently use in production.  It's an ASPX page we created in SP Designer that POSTS user logon data to a research site that many of our users utilize daily.  I tried to just upload the current page to SPO but get just the file downloaded when clicking on the page.  The page uses a Body onload JavaScript function to send the hidden data to the login process on the external site:

 

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ Page Language="C#" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml" xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="JavaScript">
	function submitFrom() {
	login.submit();
	}
</script></head>
<body onload="submitFrom();">
Loading Page, Please wait...
<form id="login" ACTION="http://www.customurl.com/login.phtml" TARGET=_top METHOD=POST>
	<input type="hidden" name="username" value="xxxxxxxx" />
	<input type="hidden" name="password" value="xxxxxxxx" />
</form></body></html>

 

 

 

This page has been working on SP2010, SP2013 & SP2016 classic sites.  I need help in changing this to work on SPO and I'm not a Full time developer.  Any help will be appreciated.

 

Also,  since I can't get SP Designer to connect to SPO, what's the recommended way to edit this file every 60 days when the hidden fields have to be edited?

 

Thank you all in advance for reading this and any suggestions. 

 

0 Replies