URL rewrite help needed

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 2
Joined: 22 Aug 2017, 12:56

URL rewrite help needed

22 Aug 2017, 13:19

Hello,

I've been trying to get url rewrite to work for few days but I'm new at this so I need some dire help.
I'm trying to force all http traffic to http://mydomain.com/apps/webapp1 to https so I've used the following line from the helicon examples page in the .htaccess file at /webapp1 folder level without success.

RewriteEngine on

RewriteCond %{HTTP:Host} (.*)
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} (.*)
RewriteRule .? https://%1%2 [R]

to test the above lines, I've moved the .htaccess from /webapp1 to http://mydomain.com/apps/ and to the root and it works fine at both levels.
I'm not sure why it won't work at the /webapp1 level. I'd appreciate any input that could shed some light on the above issue.

Thank you in advance!

User avatar
Posts: 2
Joined: 22 Aug 2017, 12:56

Re: URL rewrite help needed

23 Aug 2017, 13:26

figured this out using url rewrite module in IIS at the /webapp1 level instead of using htaccess file.

User avatar
Posts: 2
Joined: 04 Dec 2017, 22:37

Re: URL rewrite help needed

04 Dec 2017, 22:50

I want to do the same thing. To comply with Google's new rules, all pages need to enforce HTTPS.

I have this rule in place.

RewriteCond %{HTTPS} on
RewriteRule ^$ http://www.domain.com/ [R=301,L]


When I change the http to https, I get the following.


The page isn’t redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

What do I do please?

User avatar
Posts: 2
Joined: 04 Dec 2017, 22:37

Re: URL rewrite help needed

05 Dec 2017, 12:51

commenting out that rule resolved my issue. not sure why the rule was there, but problem appears to be resolved.

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 9 guests