.htacess复杂和棘手的重定向棘手、重定向、复杂、htacess

由网友(四逼青年、)分享简介:我不是专家.htacess我需要有点复杂和棘手的帮助.. !! I am not expert in .htacess that my need bit complex and tricky help..!!下面是我当前的 .htacess 并记住我需要一些 .htacess ,可以摧毁我的电流 .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$  https://domain.com/internalpath/join/index.php [L,QSA]
RewriteRule ^join/(.*)$ https://domain.com/internalpath/join/$1 [L,QSA]

现在我的问题:

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

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

https://domain.com/join/

https://domain.com/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/.+)$ https://%{HTTP_HOST}/internalpath/$1 [R=301,NC,L]

RewriteCond %{HTTPS} off
RewriteRule ^(join)/?$ https://%{HTTP_HOST}/internalpath/$1/index.php [R=301,NC,L]

RewriteCond %{HTTPS} on
RewriteRule !^join http://%{HTTP_HOST}%{REQUEST_URI} [R=301,NC,L]
阅读全文

相关推荐

最新文章