将页面重定向到不同的URL

编程入门 行业动态 更新时间:2024-10-07 05:22:01
本文介绍了将页面重定向到不同的URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

(对不起,如果我把这个话题放在一个不正确的类别中) 只是想知道是否可以将页面重定向到另一个URL,如下所示

(sorry, if I put this topic in an incorrect category) Just wondering if it's possible to redirect page to another URL as like below

我的网络服务器包含3个主文件夹和几个子文件夹 -------------------- ------------------------------- 1.文件夹A sub-folderA1 sub-folderA2 2.文件夹B sub-folderB1 3.文件夹C 当用户想要转到子文件夹A1时,他们需要输入这个,mydomain。 com / folderA / sub-folderA1 $ 他们可以使用这样的快捷方式mydomain/sub-folderA1指向mydomain/folderA / sub-folderA1 无需创建文件夹" sub-folderA1" (像这样的mydomain/sub-folderA1)? $ 我在想什么是... ----- ------------------------------------- 第1步:创建。 htaccess文件 步骤2:写一个redirect.aspx页面步骤3:选择"欲望"基于redirect.aspx的URL 但这不起作用,因为并非所有的网址(我认为它可以但实际上不是)redirect.aspx页面,任何人谁可以给我一些帮助?无论如何,谢谢。 P.S.我能做的最后一件事就是将所有文件放入 LEVEL 0 所以我网站的每个用户都不需要输入子文件文件夹名称 例如 ---------------- 子文件夹A1 子文件夹A2 子文件夹B1,子文件夹C1, 但是这看起来不是很有条理〜

my web server contains 3 main folders and couple sub-folders --------------------------------------------------- 1. folder A sub-folderA1 sub-folderA2 2. folder B sub-folderB1 3. folder C When users want to go to sub-folderA1, they need to typethis, mydomain/folderA/sub-folderA1 Is is possible for them to have a shortcut like this mydomain/sub-folderA1 which is pointing to mydomain/folderA/sub-folderA1 without the need of creating a foldercalled "sub-folderA1" (like this mydomain/sub-folderA1)? What I am thinking is ------------------------------------------ Step 1: Create .htaccess file Step 2: Write a redirect.aspx page Step 3: Poiting to the "desire" URL based on redirect.aspx But this doesn't work, as not all URLs going to (I thought it could but actually not) redirect.aspx page, anyone who can give me some help? thanks anyway. P.S. The final thing I can do is to put all file into LEVEL 0so every users of my website doesn't need to type sub-folder name e.g. ---------------- sub-folderA1 sub-folderA2 sub-folderB1 sub-folderC1 but this looks not very organized ~

推荐答案

您可以考虑使用HTTP过滤器拦截传入的请求网址,并根据用户角色重定向到所需的网页。

You can think of using HTTP filters to intercept incoming request url and redirect to desired page based on the user role.

谢谢

Devasaena。

Devasaena.

更多推荐

将页面重定向到不同的URL

本文发布于:2023-11-02 07:01:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1551686.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:重定向   页面   URL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!