Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: Please help crafting .htaccess rule? |
|
Author |
|
pierrebalian
Joined: 28 Sep 2013 Posts: 1 Location: wisconsin
|
Posted: Sat 28 Sep '13 22:10 Post subject: Please help crafting .htaccess rule? |
|
|
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
|
Posted: Fri 11 Oct '13 16:56 Post subject: |
|
|
You might try
Code: |
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^(products) https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
|
|
|
Back to top |
|
|
|
|
|
|