如何让 sun 网络服务器重定向

发布于 2024-07-04 20:22:35 字数 335 浏览 7 评论 0原文

我有 Sun 网络服务器 iws6 (iplanet 6) 代理我的 bea 集群。 我的集群位于 /portal/yadda 下。 我希望任何访问的人

http://the.domain.com/

都能快速重定向到

http://the.domain.com/portal/

我拥有的和执行帖子和重定向的index.html,但用户有时会看到它。 有人有更好的方法吗?

Aaron

我已经尝试过以下 3 个回复。 他们都不为我工作。 回到绘图板。 A

I have Sun webserver iws6 (iplanet 6) proxying my bea cluster.
My cluster is under /portal/yadda.
I want anyone who goes to

http://the.domain.com/

to be quickly redirected to

http://the.domain.com/portal/

I have and index.html that does a post and redirect, but the user sometimes sees it.
Does anyone have a better way?

Aaron

I have tried the 3 replies below. None of them worked for me. Back to the drawing board.
A

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

心如狂蝶 2024-07-11 20:22:35

这有帮助吗?
http://docs.sun.com/source/816- 5691-10/essearch.htm#25618


要映射 URL,请执行以下步骤:

打开类管理器并从下拉列表中选择服务器实例。

选择内容管理选项卡。

单击其他文档目录链接。
Web 服务器显示“其他文档目录”页面。
(可选)通过输入以下内容之一添加另一个目录。

网址前缀。
例如:计划。
您希望 URL 映射到的目录的绝对物理路径。
例如:
C:/iPlanet/Servers/docs/marketing/plans
单击“确定”。

单击“应用”。

通过选择以下选项之一编辑当前列出的附加目录之一:
编辑

删除
如果进行编辑,请选择要更改的列出目录旁边的编辑。

使用 ASCII 格式输入新前缀。

(可选)如果要将样式应用到目录,请在“应用样式”下拉列表中选择一种样式:
有关样式的更多信息,请参阅应用配置样式。
单击“确定”添加新文档目录。

单击“应用”。

选择“应用更改”以硬启动/重新启动服务器。

Does this help?
http://docs.sun.com/source/816-5691-10/essearch.htm#25618


To map a URL, perform the following steps:

Open the Class Manager and select the server instance from the drop-down list.

Choose the Content Mgmt tab.

Click the Additional Document Directories link.
The web server displays the Additional Document Directories page.
(Optional) Add another directory by entering one of the following.

URL prefix.
For example: plans.
Absolute physical path of the directory you want the URL mapped to.
For example:
C:/iPlanet/Servers/docs/marketing/plans
Click OK.

Click Apply.

Edit one of the current additional directories listed by selecting one of the following:
Edit

Remove
If editing, select edit next to the listed directory you wish to change.

Enter a new prefix using ASCII format.

(Optional) Select a style in the Apply Style drop-down list if you want to apply a style to the directory:
For more information about styles, see Applying Configuration Styles.
Click OK to add the new document directory.

Click Apply.

Choose Apply Changes to hard start /restart your server.

原野 2024-07-11 20:22:35

您还可以在 .htaccess 文件中添加以下行

Redirect permanent /oldpage.html http://www .example.com/newpage.html

You could also just add the below line in the .htaccess file

Redirect permanent /oldpage.html http://www.example.com/newpage.html

萌吟 2024-07-11 20:22:35

您应该能够将网络服务器配置为执行标头重定向(301 或 302,具体取决于您的情况),以便它在不加载 HTML 页面的情况下进行重定向。 这也可以在 PHP 中完成:

<?php
header("Location: http://www.example.com/"); /* Redirect browser */

/* Make sure that code below does not get executed when we redirect. */
exit;
?>

如果您不想修改服务器配置。

如果您的服务器使用 .htaccess 文件,请插入类似于以下内容的行:

Redirect 301 /oldpage.html http://www.example.com/newpage.html

-Adam

You should be able to configure the webserver to do a header redirect (301 or 302 depending on your situation) so it redirects without ever loading an HTML page. This can be done in PHP as well:

<?php
header("Location: http://www.example.com/"); /* Redirect browser */

/* Make sure that code below does not get executed when we redirect. */
exit;
?>

If you don't want to modify your server configuration.

If your server uses the .htaccess file, insert a line similar to the following:

Redirect 301 /oldpage.html http://www.example.com/newpage.html

-Adam

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文