.htacess复杂和棘手的重定向

编程入门 行业动态 更新时间:2024-10-10 10:32:39
本文介绍了.htacess复杂和棘手的重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我不是专家.htacess我需要有点复杂和棘手的帮助.. !!

I am not expert in .htacess that my need bit complex and tricky help..!!

下面是我当前的 .htacess 并记住我需要一些 .htacess ,可以摧毁我的电流 .htacess 。

Here is my current .htacess and remember i need some .htacess that can destroy my current .htacess.

电流 .htacess :

RewriteRule ^join$ domain/internalpath/join/index.php [L,QSA] RewriteRule ^join/(.*)$ domain/internalpath/join/$1 [L,QSA]

现在我的问题:

我想每一个文件和目录HTTP重定向,除了这两个:

I want to redirect each and every file and directories to HTTP, except these two:

domain/join/

domain/join

记住,我要在http每一个环节,除了这上面提供的链接,其他则所有的文件和目录,甚至文件和/加盟/或/加盟将是HTTP,在HTTP上只有两个链接目录,但请它不会摧毁previous书面.htacess。

Remember, I want every link on http except this above provided link, other then all files and directories and even files and directories in /join/ or /join will be HTTP, just two links on HTTP, but please it will not destroy the previous written .htacess.

推荐答案

您需要这三个规则:

RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(join/.+)$ %{HTTP_HOST}/internalpath/$1 [R=301,NC,L] RewriteCond %{HTTPS} off RewriteRule ^(join)/?$ %{HTTP_HOST}/internalpath/$1/index.php [R=301,NC,L] RewriteCond %{HTTPS} on RewriteRule !^join %{HTTP_HOST}%{REQUEST_URI} [R=301,NC,L]

更多推荐

.htacess复杂和棘手的重定向

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

发布评论

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

>www.elefans.com

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