问题描述
Hi Team,
我想从内部部署SharePoint 2010上的网站重定向到SharePoint Online上的迁移网站。我们有数千个站点要迁移和重定向。我们在JavaScript下面使用信息将网站重定向到网站,但是,我们有很多
的网站需要重定向,因此我们正在考虑使用Powershell脚本将JavaScript添加到每个网站。
I would like to redirect from sites on on-premises SharePoint 2010 to migrated sites on SharePoint Online. We have thousands of sites to migrate and redirect. We have the information to use below JavaScript to redirect site to site, however, we have a lot of sites to redirect so we are thinking to use Powershell script to add the JavaScript to each site.
---- JavaScript ---
----JavaScript---
< script type =" text / javascript">
location.href ="<<您要重定向的网址>>" ;;
$
< / script>
<script type="text/javascript">
location.href = "<<the url you want to redirect>>";
</script>
------------------ &NBSP; &NBSP; &NBSP; &NBSP;
------------------
-----行动------
-----Actions------
1。添加内容编辑器
2.编辑HTML以添加上述JavaScript
3.保存更改
1. Add an content editor
2. Edit HTML to add above JavaScript
3. Save the changes
----- ---------------
--------------------
您是否可以共享Powershell脚本以使用不同的URL多次执行上述操作?
Could you share Powershell script to execute the above actions many times with different URLs?
我们在powershell下面找到了使用powershell添加内容编辑器但我们不确定如何使用重定向。
We found below powershell to add content editor with powershell but we are not sure how to use for redirections.
----找到重定向Powershell ----- -
----Found redirect Powershell------
--------- --------------------------------
-----------------------------------------
推荐答案
我建议您使用URL重写来满足此要求。
I would suggest you use URL rewrite for this requirement.
以下是供您参考的帖子。
Here is the thread for your reference.
最好问候,
Lee
这篇关于Powershell将脚本从内部部署SharePoint重定向到SharePoint Online网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!