logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Please help crafting .htaccess rule?
Author
pierrebalian



Joined: 28 Sep 2013
Posts: 1
Location: wisconsin

PostPosted: Sat 28 Sep '13 22:10    Post subject: Please help crafting .htaccess rule? Reply with quote

Hello,

I am new to apache, and really terrible with regular expressions.

I was hoping someone could please help me to craft an htaccess rule that looks a the URL of the page you are visiting, and redirects HTTPS to the same URL in HTTP if the URL contains a certain text string (in the case the word "products")

Kind Regards,
Pierre
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Fri 11 Oct '13 16:56    Post subject: Reply with quote

You might try

Code:

RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^(products) https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
Back to top


Reply to topic   Topic: Please help crafting .htaccess rule? View previous topic :: View next topic
Post new topic   Forum Index -> Apache