Enjoy unlimited access to all forum features for FREE! Optional upgrade available for extra perks.
Domain summit 2024

How to exclude a single page from htaccess rules?

dario1977

New Member
Legacy Platinum Member
Joined
Dec 14, 2004
Messages
3
Reaction score
0
Hi
I have 2 rules in my htaccess that
- force the use of www. in front of domain name
- redirect all urls from http to https

RewriteEngine On
RewriteCond %{HTTP_HOST} ^terapiadicoppiabrescia.it [NC]
RewriteRule ^(.*)$ http://www.terapiadicoppiabrescia.it/$1 [L,R=301]
RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

My problem is that I have 1 page that must be opened in http only, and never in https

How could I get that?
Thank you
 
Domain summit 2024

dennis123

Level 1
Legacy Gold Member
Joined
Apr 5, 2013
Messages
14
Reaction score
0
In Apache, you can do this with the following rewrite rule in the .htaccess file:
RewriteEngine On
RewriteRule ^page-that-stays.html$ - [L]
This must appear before the rule that redirects the rest of the site.
 

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Sedo - it.com Premiums

IT.com

Premium Members

AucDom
UKBackorder
Be a Squirrel
MariaBuy

New Threads

Our Mods' Businesses

UrlPick.com
Free QR Code Generator by MerchArts

*the exceptional businesses of our esteemed moderators

Top Bottom