| Author |
|
rbraat Newbie

Joined: 14 February 2011
Online Status: Offline Posts: 8
|
| Posted: 14 February 2011 at 3:32am | IP Logged
|
|
|
Hi,
I need a solution to rewite every URL with HTTPS in it to HTTP. I found ISAPI REWRITE could do the trick. So I installed isapi_rwl_x86_0077.msi and loaded the ISAPI_Rewrite.dll as an ISAPI filter in IIS6 (running on Windows Server 2003). It shows a green arrow. I put the lines
RewriteCond %HTTPS (?!off).* RewriteCond Host: (.*) RewriteRule (.*) http\://$1$2 [I,RP]
In httpd.ini (read access to the IUSR_servername-account) but I notice no rewriting. In the FAQ (http://www.helicontech.com/forum/10648-FAQ.html) I saw I can put the line
RewriteRule .? - [F]
in httpd to test. When I do so, I don't get a 403, but a 404. The FAQ says: something is wrong and we are waiting for your post on our forum. So here I am. Can anyone help me?
Kindest regards, Rini
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 14 February 2011 at 7:38am | IP Logged
|
|
|
Hello, Rini
Everything you did looks correct, but I have a couple of concerns:
- have you installed ISAPI_Rewrite automatically and then registered the dll on site level?
The thing is that upon automatic installation, ISAPI_Rewrite registers itself globally (on server level) and there's no need to do any
additional registrations.
- As far as I understand, you have installed ISAPI_Rewrite v2, and the testing rule you found refers to v3, that's why it didn't work.
To test functionality in v2, you can use the following rule:
RewriteRule .* http\://www.google.com [RP]
Make the request to any page on your site. If you get to the Google page, ISAPI_Rewrite is working, if not, then we'll continue
investigating.
- also if you are on v2, do you have [ISAPI_Rewrite] line on top of config?
__________________ Regards,
Anton
|
| Back to Top |
|
| |
rbraat Newbie

Joined: 14 February 2011
Online Status: Offline Posts: 8
|
| Posted: 14 February 2011 at 8:39am | IP Logged
|
|
|
Hi Anton,
Thanks for your help.
I deinstalled ISAPI_rewrite and installed it again with default options. I see it's registered at server level. I didn't do any additional registration.
I've put "RewriteRule .* http\://www.google.com [RP]" in the ini-file and this works! great.
But now I want to rewrite every URL with HTTPS to HTTP. I used these lines:
===
RewriteCond %HTTPS (?!off).*
RewriteCond Host: (.*)
RewriteRule (.*) http\://$1$2 [I,RP]
===
But that doesn't do anything.
Can you tell me what's wrong?
Can you also tell me what's the dirrerence between V2 and V3? Which should I use?
regards, Rini
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 14 February 2011 at 8:56am | IP Logged
|
|
|
Please have a look at httpd.parse.errors file which is located in ISAPI_Rewrite installation folder.
If there are any messages, please show them.
Also please tell whether you put the rules into the httpd.ini in the installation folder.
And show the testing request you try.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
rbraat Newbie

Joined: 14 February 2011
Online Status: Offline Posts: 8
|
| Posted: 14 February 2011 at 3:28pm | IP Logged
|
|
|
Hi Anton,
I've set the permission so that httpd.parse.errors could be created. But nothing appears in the log. So I've put some nonsense in the httpd.ini-file and then the logfiles tells me: "Unrecognized string "abc" at line 2". So logging is working.
I've put the lines ...
RewriteCond %HTTPS (?!off).* RewriteCond Host: (.*) RewriteRule (.*) http\://$1$2 [I,RP]
... back, just beneath [ISAPI_Rewrite], but when I go to my site and enter just any URL, no errors appear. I entered the url https://www.mysite.com which should be switched to http://www.mysite.com
First, the file httpd.ini was in the installation folder. After that, I moved the file to the root of my site. Everything is the same, no errors, not working.
Hope you can figure this out?
Kindest regards, Rini
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 15 February 2011 at 2:50am | IP Logged
|
|
|
As far as I see, you have installed Lite version of ISAPI_Rewrite, right?
If yes, then you must know that Lite version supports server config (in installation folder) only. Per-site configs are available in Full
version.
So please try to put it back into global httpd.ini and retry.
If it's still not working, please uninstall and install Lite version of ISAPI_Rewrite 3.
Put the following lines into the global httpd.conf:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} (?!off).*
RewriteRule (.*) http\://%{HTTP_HOST}/$1 [R=301,L]
__________________ Regards,
Anton
|
| Back to Top |
|
| |
rbraat Newbie

Joined: 14 February 2011
Online Status: Offline Posts: 8
|
| Posted: 15 February 2011 at 6:37am | IP Logged
|
|
|
Hi Anton,
That's right, I use the light version. It's no problem to buy the full version, but I will only do so if the product works for me.
I'be put httpd.ini back in the global directory, no change.
I deinstalled and installed ISAPI_Rewrite 3. I checked and the filter is installed and has a green arrow. My site loads normally.
I've put the lines
RewriteEngine On RewriteBase / RewriteCond %{HTTPS} (?!off).* RewriteRule (.*) http\://%{HTTP_HOST}/$1 [R=301,L]
in httpd.conf. Now my site won't load anymore. In the statusbar below I see a very rapid changing text. As far as I can see it shows something as "Website found, one moment please ..." which changes to "Redirection found <and here a part of my sitename>". I can't read it clearly because it changes about 100 times a second ...
Obvious, this is not working. Hope you can help again ...
regards, Rini
|
| Back to Top |
|
| |
rbraat Newbie

Joined: 14 February 2011
Online Status: Offline Posts: 8
|
| Posted: 15 February 2011 at 6:39am | IP Logged
|
|
|
Addition to my looping site: the errorlog shows only this line:
[2/15/2011 13:25:27] ISAPI Filter loaded. Version 3.1.0.79. Windows 5.2 (Build 3790 ServicePack:2) ProductType SERVER. CPU type INTEL NumberOfProcessors 1.
Nothing more.
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 16 February 2011 at 3:51am | IP Logged
|
|
|
Let's try it the following way in v3:
RewriteCond %{HTTPS} on
RewriteRule .? http://%{HTTP_HOST}%{REQUEST_URI} [R,L]
If it still doesn't work, please enable logging by putting
RewriteLogLevel 9
into the httpd.conf. Then make the request again and check the rewrite.log file in the installation folder.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
rbraat Newbie

Joined: 14 February 2011
Online Status: Offline Posts: 8
|
| Posted: 16 February 2011 at 4:06am | IP Logged
|
|
|
Hi Anton,
Still no success. I've put the lines
RewriteLogLevel 9 RewriteCond %{HTTPS} on RewriteRule .? http://%{HTTP_HOST}%{REQUEST_URI} [R,L]
in httpd.conf. On my site I've enered the URL:
https://academy.open-groupe.nl
This shows up in Rewrite.log:
192.168.1.17 192.168.1.17 Wed, 16-Feb-2011 11:04:21 GMT [academy.open-groupe.nl/sid#354523174][rid#19603392/initial] (2) init rewrite engine with requested uri / 192.168.1.17 192.168.1.17 Wed, 16-Feb-2011 11:04:21 GMT [academy.open-groupe.nl/sid#354523174][rid#19603392/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf 192.168.1.17 192.168.1.17 Wed, 16-Feb-2011 11:04:21 GMT [academy.open-groupe.nl/sid#354523174][rid#19603392/initial] (3) applying pattern '.?' to uri '/' 192.168.1.17 192.168.1.17 Wed, 16-Feb-2011 11:04:21 GMT [academy.open-groupe.nl/sid#354523174][rid#19603392/initial] (4) RewriteCond: input='off' pattern='on' => not-matched 192.168.1.17 192.168.1.17 Wed, 16-Feb-2011 11:04:22 GMT [academy.open-groupe.nl/sid#354523174][rid#19603096/initial] (2) init rewrite engine with requested uri /modules/mod_latestdiscussion/style.css 192.168.1.17 192.168.1.17 Wed, 16-Feb-2011 11:04:22 GMT [academy.open-groupe.nl/sid#354523174][rid#19603096/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf 192.168.1.17 192.168.1.17 Wed, 16-Feb-2011 11:04:22 GMT [academy.open-groupe.nl/sid#354523174][rid#19603096/initial] (3) applying pattern '.?' to uri '/modules/mod_latestdiscussion/style.css' 192.168.1.17 192.168.1.17 Wed, 16-Feb-2011 11:04:22 GMT [academy.open-groupe.nl/sid#354523174][rid#19603096/initial] (4) RewriteCond: input='off' pattern='on' => not-matched 192.168.1.17 192.168.1.17 Wed, 16-Feb-2011 11:04:22 GMT [academy.open-groupe.nl/sid#354523174][rid#19603392/initial] (2) init rewrite engine with requested uri /index.php?option=com_jbolo&view=js&format=raw 192.168.1.17 192.168.1.17 Wed, 16-Feb-2011 11:04:22 GMT [academy.open-groupe.nl/sid#354523174][rid#19603392/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf 192.168.1.17 192.168.1.17 Wed, 16-Feb-2011 11:04:22 GMT [academy.open-groupe.nl/sid#354523174][rid#19603392/initial] (3) applying pattern '.?' to uri '/index.php' 192.168.1.17 192.168.1.17 Wed, 16-Feb-2011 11:04:22 GMT [academy.open-groupe.nl/sid#354523174][rid#19603392/initial] (4) RewriteCond: input='off' pattern='on' => not-matched 192.168.1.17 192.168.1.17 Wed, 16-Feb-2011 11:04:22 GMT [academy.open-groupe.nl/sid#354523174][rid#19603096/initial] (2) init rewrite engine with requested uri /://0 192.168.1.17 192.168.1.17 Wed, 16-Feb-2011 11:04:22 GMT [academy.open-groupe.nl/sid#354523174][rid#19603096/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf 192.168.1.17 192.168.1.17 Wed, 16-Feb-2011 11:04:22 GMT [academy.open-groupe.nl/sid#354523174][rid#19603096/initial] (3) applying pattern '.?' to uri '/://0' 192.168.1.17 192.168.1.17 Wed, 16-Feb-2011 11:04:22 GMT [academy.open-groupe.nl/sid#354523174][rid#19603096/initial] (4) RewriteCond: input='off' pattern='on' => not-matched 192.168.1.17 192.168.1.17 Wed, 16-Feb-2011 11:04:22 GMT [academy.open-groupe.nl/sid#354523174][rid#19603392/initial] (2) init rewrite engine with requested uri /templates/ja_purity/images/header/header7.jpg 192.168.1.17 192.168.1.17 Wed, 16-Feb-2011 11:04:22 GMT [academy.open-groupe.nl/sid#354523174][rid#19603392/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf 192.168.1.17 192.168.1.17 Wed, 16-Feb-2011 11:04:22 GMT [academy.open-groupe.nl/sid#354523174][rid#19603392/initial] (3) applying pattern '.?' to uri '/templates/ja_purity/images/header/header7.jpg' 192.168.1.17 192.168.1.17 Wed, 16-Feb-2011 11:04:22 GMT [academy.open-groupe.nl/sid#354523174][rid#19603392/initial] (4) RewriteCond: input='off' pattern='on' => not-matched
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 16 February 2011 at 8:17am | IP Logged
|
|
|
That's rather weird.
The request comes to ISAPI_Rewrite as http...
Please tell whether you have any other ISAPI filters registered.
Maybe you have have both ISAPI_Rewrite 2 and 3 installed at a time?
If it's none of the above, I guess we should have a meeting or remote access to your server to check.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
rbraat Newbie

Joined: 14 February 2011
Online Status: Offline Posts: 8
|
| Posted: 16 February 2011 at 8:51am | IP Logged
|
|
|
Hi Anton,
I have no other filters installed.
I would like to welcome you to my server if you think you can fix this. I realy need a solution, because after logging in, the site switches to https and some joomla modules on it don't function with https.
I use the joomla login module to only send the form with name and password over https, so it's possitble to access the site in http, type in your credentials (this form is sent over https) and after logghing in, the site should remain in http (which it doesn't). I can't solve the problem that the site switched to https, seems like a lot of people are having this problem, so the only solution is to have a rewriter to force it back to http.
Can I PM or e-mail you some info so you can have access?
Regards
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 17 February 2011 at 1:29am | IP Logged
|
|
|
Yes, sure. Please email me the access details to support@helicontech.com and put the reference to this forum post somewhere in the message.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
rbraat Newbie

Joined: 14 February 2011
Online Status: Offline Posts: 8
|
| Posted: 17 February 2011 at 5:02am | IP Logged
|
|
|
I've done so ...
|
| Back to Top |
|
| |