| Author |
|
CelloJ Newbie

Joined: 14 April 2008 Location: United States
Online Status: Offline Posts: 17
|
| Posted: 14 April 2008 at 4:33pm | IP Logged
|
|
|
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 |
|
| |
Yaroslav Moderator Group

Joined: 15 August 2002
Online Status: Offline Posts: 6451
|
| Posted: 15 April 2008 at 7:16am | IP Logged
|
|
|
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 |
|
| |
CelloJ Newbie

Joined: 14 April 2008 Location: United States
Online Status: Offline Posts: 17
|
| Posted: 15 April 2008 at 9:08am | IP Logged
|
|
|
Can you please post an example for www.myurl.com? Thank you.
|
| Back to Top |
|
| |
CelloJ Newbie

Joined: 14 April 2008 Location: United States
Online Status: Offline Posts: 17
|
| Posted: 15 April 2008 at 11:07am | IP Logged
|
|
|
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 |
|
| |
Yaroslav Moderator Group

Joined: 15 August 2002
Online Status: Offline Posts: 6451
|
| Posted: 16 April 2008 at 9:35am | IP Logged
|
|
|
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 |
|
| |
CelloJ Newbie

Joined: 14 April 2008 Location: United States
Online Status: Offline Posts: 17
|
| Posted: 16 April 2008 at 10:47am | IP Logged
|
|
|
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 |
|
| |
Yaroslav Moderator Group

Joined: 15 August 2002
Online Status: Offline Posts: 6451
|
| Posted: 17 April 2008 at 10:22am | IP Logged
|
|
|
Sorry, my rules was for V3. Yes, it is OK.
__________________ Yaroslav Govorunov,
Helicon Tech
|
| Back to Top |
|
| |
CelloJ Newbie

Joined: 14 April 2008 Location: United States
Online Status: Offline Posts: 17
|
| Posted: 15 May 2008 at 10:33am | IP Logged
|
|
|
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 |
|
| |
CelloJ Newbie

Joined: 14 April 2008 Location: United States
Online Status: Offline Posts: 17
|
| Posted: 15 May 2008 at 10:35am | IP Logged
|
|
|
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 |
|
| |
Lexey Moderator Group

Joined: 15 August 2002 Location: Russian Federation
Online Status: Offline Posts: 7259
|
| Posted: 16 May 2008 at 3:54pm | IP Logged
|
|
|
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 |
|
| |