Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 3.0 support forum
 Helicon Tech : ISAPI_Rewrite 3.0 support forum
Subject Topic: Cant get install working IIS6 Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
vartana
Newbie
Newbie


Joined: 25 September 2008
Online Status: Offline
Posts: 4
Posted: 25 September 2008 at 4:30pm | IP Logged Quote vartana

Hi, im on a win2k3 server with ver3 of rewrite. I have manually added the extension and enabled it and have set permissions to the files.

I have used the utility to add to http.conf

# 301 redirect from domain.com to www.domain.com
RewriteCond Host: (?!www\.)(.*)
RewriteCond METHOD GET|HEAD
RewriteCond %HTTPS (on)|.*
RewriteRule (.*) http(?2s:)\://www.$1$3 [I,RP]


when i goto https:// domain.com it does not redirect to https://www.domain.com. What am i missing?

Thank You.
Back to Top View vartana's Profile Search for other posts by vartana
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4837
Posted: 26 September 2008 at 3:35am | IP Logged Quote Anton

Please try to apply this config:

RewriteEngine on
RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP:Host} ^(?!www\.)(.+)$ [NC]
RewriteCond %{REQUEST_URI} (.+)
RewriteRule .? http(?%1s)://www.%2%3 [R=301,L]


__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
vartana
Newbie
Newbie


Joined: 25 September 2008
Online Status: Offline
Posts: 4
Posted: 26 September 2008 at 12:23pm | IP Logged Quote vartana

That worked for http:// but not https://
Any ideas of what it  can be?


Anton wrote:
Please try to apply this config:

RewriteEngine on
RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP:Host} ^(?!www\.)(.+)$ [NC]
RewriteCond %{REQUEST_URI} (.+)
RewriteRule .? http(?%1s)://www.%2%3 [R=301,L]
Back to Top View vartana's Profile Search for other posts by vartana
 
vartana
Newbie
Newbie


Joined: 25 September 2008
Online Status: Offline
Posts: 4
Posted: 27 September 2008 at 9:07pm | IP Logged Quote vartana

Anton thank you for your replay can you also help me by telling me how to make it only rewrite first level domains.

right now if i type admin.domain.com it will make it www.admin.domain.com, i just want it to be done to first level domains. I am also still having an issue where it does not effect https://

Anton wrote:
Please try to apply this config:

RewriteEngine on
RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP:Host} ^(?!www\.)(.+)$ [NC]
RewriteCond %{REQUEST_URI} (.+)
RewriteRule .? http(?%1s)://www.%2%3 [R=301,L]
Back to Top View vartana's Profile Search for other posts by vartana
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4837
Posted: 29 September 2008 at 6:11am | IP Logged Quote Anton

https requests should be processed ok. Please check if https is enabled for your site.
And to make it work for first level domains only, please use this:

RewriteEngine on
RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP:Host} ^(?!www\.)([^.].+)\.com$ [NC]
RewriteCond %{REQUEST_URI} (.+)
RewriteRule .? http(?%1s)://www.%2%3 [R=301,L]

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
vartana
Newbie
Newbie


Joined: 25 September 2008
Online Status: Offline
Posts: 4
Posted: 29 September 2008 at 2:00pm | IP Logged Quote vartana

Anton https is enabled and when i goto https://domain.com it goes just fine, but i need it to rewrite it to https://www.domain.com

The problem im having with the code you provided now is if i type http://admin.domain.com it forwards to http://www.admin.domain
 
and still has no effect on https

Anton wrote:
https requests should be processed ok. Please check if https is enabled for your site.
And to make it work for first level domains only, please use this:

RewriteEngine on
RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP:Host} ^(?!www\.)([^.].+)\.com$ [NC]
RewriteCond %{REQUEST_URI} (.+)
RewriteRule .? http(?%1s)://www.%2%3 [R=301,L]


Edited by vartana - 29 September 2008 at 2:08pm
Back to Top View vartana's Profile Search for other posts by vartana
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4837
Posted: 30 September 2008 at 5:12am | IP Logged Quote Anton

Please provide rewrite log records for the request http://admin.domain.com and for some https request.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You can vote in polls in this forum