Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x support forum
 Helicon Tech : ISAPI_Rewrite 2.x support forum
Subject Topic: Rule Optimization Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
CelloJ
Newbie
Newbie


Joined: 14 April 2008
Location: United States
Online Status: Offline
Posts: 22
Posted: 14 April 2008 at 4:33pm | IP Logged Quote CelloJ

I am running the Lite version, but have several domain names installed on my IIS.

Since only one of the domain names needs rewrite, what should I do so that the requests to the other URLs are not inspected?

In IIS, can I move the ISAPI from the top level node to the site I need it to rewrite? or should I focus on optimizing the Rules and Conditions?

Tks, in advance!

Back to Top View CelloJ's Profile Search for other posts by CelloJ Visit CelloJ's Homepage
 
Yaroslav
Moderator Group
Moderator Group


Joined: 15 August 2002
Online Status: Offline
Posts: 6445
Posted: 15 April 2008 at 7:16am | IP Logged Quote Yaroslav

Yes, you can move the filter. But note that it will still use httpd.conf from installation directory. If you need more than one web site you may use RewriteCond %{HTTP_HOST} to differentiate rules.

__________________
Yaroslav Govorunov,
Helicon Tech
Back to Top View Yaroslav's Profile Search for other posts by Yaroslav Visit Yaroslav's Homepage
 
CelloJ
Newbie
Newbie


Joined: 14 April 2008
Location: United States
Online Status: Offline
Posts: 22
Posted: 15 April 2008 at 9:08am | IP Logged Quote CelloJ

Can you please post an example for www.myurl.com?  Thank you.
Back to Top View CelloJ's Profile Search for other posts by CelloJ Visit CelloJ's Homepage
 
CelloJ
Newbie
Newbie


Joined: 14 April 2008
Location: United States
Online Status: Offline
Posts: 22
Posted: 15 April 2008 at 11:07am | IP Logged Quote CelloJ

Also, isn't EnableRewrite "www.myurl.com" an option for what I am trying to do above?

This is if the site is named after its URL.

Back to Top View CelloJ's Profile Search for other posts by CelloJ Visit CelloJ's Homepage
 
Yaroslav
Moderator Group
Moderator Group


Joined: 15 August 2002
Online Status: Offline
Posts: 6445
Posted: 16 April 2008 at 9:35am | IP Logged Quote Yaroslav

I don't know anything about "EnableRewrite" directive.

RewriteCond %{HTTP_HOST} ^(?:www\.)?myurl.com
RewriteRule ...
RewriteCond %{HTTP_HOST} ^(?:www\.)?myurl.com
RewriteRule second.htm ...

__________________
Yaroslav Govorunov,
Helicon Tech
Back to Top View Yaroslav's Profile Search for other posts by Yaroslav Visit Yaroslav's Homepage
 
CelloJ
Newbie
Newbie


Joined: 14 April 2008
Location: United States
Online Status: Offline
Posts: 22
Posted: 16 April 2008 at 10:47am | IP Logged Quote CelloJ

I did it like this, is that ok?  This tested ok...  What is the difference?

RewriteCond  %HTTP_HOST www.myurl.com
RewriteRule  ...
RewriteCond  %HTTP_HOST www.myurl.com
RewriteRule  ...

Thank you so much for your prompt replies!

Back to Top View CelloJ's Profile Search for other posts by CelloJ Visit CelloJ's Homepage
 
Yaroslav
Moderator Group
Moderator Group


Joined: 15 August 2002
Online Status: Offline
Posts: 6445
Posted: 17 April 2008 at 10:22am | IP Logged Quote Yaroslav

Sorry, my rules was for V3. Yes, it is OK.

__________________
Yaroslav Govorunov,
Helicon Tech
Back to Top View Yaroslav's Profile Search for other posts by Yaroslav Visit Yaroslav's Homepage
 
CelloJ
Newbie
Newbie


Joined: 14 April 2008
Location: United States
Online Status: Offline
Posts: 22
Posted: 15 May 2008 at 10:33am | IP Logged Quote CelloJ

Thanks!

PS: Is there a way to set a RewriteCond for a large chunk of RewriteRules?

Like this?

RewriteCond  %HTTP_HOST www.myurl.com
RewriteRule  1
RewriteRule  2

Back to Top View CelloJ's Profile Search for other posts by CelloJ Visit CelloJ's Homepage
 
CelloJ
Newbie
Newbie


Joined: 14 April 2008
Location: United States
Online Status: Offline
Posts: 22
Posted: 15 May 2008 at 10:35am | IP Logged Quote CelloJ

Still on the topic of optimization, can you please tell me if this makes sense in v2.0 and how should the syntax read?

RewriteRule (.*\.(?:gif|png|jpg|pdf|js|css)) - [NC,L]

I got this from an example of v3.0...

Thanks!

Back to Top View CelloJ's Profile Search for other posts by CelloJ Visit CelloJ's Homepage
 
Lexey
Moderator Group
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Online Status: Offline
Posts: 7372
Posted: 16 May 2008 at 3:54pm | IP Logged Quote Lexey

Quote:
PS: Is there a way to set a RewriteCond for a large chunk of RewriteRules?


No, you will need to add a condition to each rule.

Quote:
RewriteRule (.*\.(?:gif|png|jpg|pdf|js|css)) - [NC,L]


RewriteRule [^?]+\.(?:gif|png|jpg|pdf|js|css)(?:\?.*)? $0 [I,L]
Back to Top View Lexey's Profile Search for other posts by Lexey
 

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