gigamike

Active Member
Jan 14, 2008
25
0
51
Guys,

Been working several hours, i have a site which has SSL and im redirecting all non http to https i.e.

Code:
# http to https
RewriteCond %{HTTPS} off
RewriteRule ^(.*) [URL]https://%{HTTP_HOST}%{REQUEST_URI}[/URL] [R,L]
But is it possible to exclude a give REQUEST_URI not to redirect via https?

something like this
Code:
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !/play/\d+$ [NC]
RewriteRule ^(.*) [URL]https://%{HTTP_HOST}%{REQUEST_URI}[/URL] [R,L]
it always redirecting to http://domain.com/play/123 to https://domain.com/play/123, is it possible not to redirect a given REQUEST_URI

Thanks in advance,

Mike
 
Last edited by a moderator:

JacobPerkins

Well-Known Member
May 2, 2014
617
97
103
cPanel Access Level
DataCenter Provider
Twitter
Hi,
If I understand correctly, you do *NOT* want the /play/ directory to be changed / adjusted via your rewrite rules? You can simply add a .htaccess file to your /play/ directory with 'RewriteEngine Off' inside of it, and this should work.
 
  • Like
Reactions: gigamike

gigamike

Active Member
Jan 14, 2008
25
0
51
Hi,
If I understand correctly, you do *NOT* want the /play/ directory to be changed / adjusted via your rewrite rules? You can simply add a .htaccess file to your /play/ directory with 'RewriteEngine Off' inside of it, and this should work.
Hi,

thanks for the idea, that's what i did and it works.

thanks again,

Mike