Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: need to exclude www rewrite for 127.0.01 Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
shawnaraxi
Newbie
Newbie


Joined: 26 January 2010
Online Status: Offline
Posts: 22
Posted: 15 May 2010 at 10:44am | IP Logged Quote shawnaraxi

on my laptop I get this error

Oops! Internet Explorer could not find www.127.0.0.1

rather than delete the www rule I want to write a condition to add ww except if localhost or 127.0.0.1

here are my rules right now

[ISAPI_Rewrite]
RewriteCond %HTTPS (on)?
RewriteCond Host: (?!www\.)(.+)
#RewriteRule (.*) http(?$1s:)\://www.$2$3 [I,RP]

# SHOULD BE ON TOP: Redirect non-www website to www
RewriteCond Host: (?!www\.)(.+)
#RewriteRule (.*) http\://www\.$1$2 [I,RP]

Back to Top View shawnaraxi's Profile Search for other posts by shawnaraxi
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10489
Posted: 17 May 2010 at 3:15am | IP Logged Quote Anton

Please try to use the following:

[ISAPI_Rewrite]
RewriteCond %HTTPS (on)?
RewriteCond Host: (?!(?:www\.|localhost|127\.0\.0\.1))(.+)
RewriteRule (.*) http(?$1s:)\://www.$2$3 [I,RP]

# SHOULD BE ON TOP: Redirect non-www website to www
RewriteCond Host: (?!www\.)(.+)
#RewriteRule (.*) http\://www\.$1$2 [I,RP]

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


Joined: 26 January 2010
Online Status: Offline
Posts: 22
Posted: 18 May 2010 at 10:38pm | IP Logged Quote shawnaraxi

worked great. thank you.
Back to Top View shawnaraxi's Profile Search for other posts by shawnaraxi
 

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 cannot vote in polls in this forum