Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

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

Current .htaccess:

RewriteRule ^join$  https://example.com/internalpath/join/index.php [L,QSA]
RewriteRule ^join/(.*)$ https://example.com/internalpath/join/$1 [L,QSA]

Now my problem:

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

https://example.com/join/

https://example.com/join

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 .htaccess.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
290 views
Welcome To Ask or Share your Answers For Others

1 Answer

Try this (not tested):

RewriteCond %{REQUEST_URI} !/join/?$ [NC]
RewriteRule ^(.*)$ http://domain.com/internalpath/$1 [R=301,QSA,L]

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...