Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: Exclude .html files from rewrite rules (Topic Closed Topic Closed) Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Sa1k0
Newbie
Newbie


Joined: 02 July 2009
Location: Netherlands
Online Status: Offline
Posts: 13
Posted: 02 July 2009 at 9:43am | IP Logged  

Hi Everybody,

I'm trying to exclude .html files from being rewrited by Isapi_Rewrite 2.

But i cant get it to work.

I tried the following rule but the layout gets lost. How can i stop this.
#Exclude html
RewriteRule ^.+\.(?:html)$ - [NC,L]

And i also have another one i cant get to work.

Example:

I have www.domain.nl/?id=1  and i want to redirect this to www.domain.nl/?id=2

It stays on the same domain.

Thank you for your help.
Back to Top View Sa1k0's Profile Search for other posts by Sa1k0
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 9798
Posted: 03 July 2009 at 1:21am | IP Logged  

Please try the following rule to exclude html:

RewriteRule /.+\.html $0 [I,L]

And for the second question:

RewriteRule /?id=1 /?id=2 [I,RP]

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


Joined: 02 July 2009
Location: Netherlands
Online Status: Offline
Posts: 13
Posted: 03 July 2009 at 2:12am | IP Logged  

Anton the first one works like a charm. But the second one does not work. I think it is going wrong on the ? symbol. But you are the expert.
Back to Top View Sa1k0's Profile Search for other posts by Sa1k0
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 9798
Posted: 03 July 2009 at 3:07am | IP Logged  

Please try to escape question marks like this:

RewriteRule /\?id=1 /\?id=2 [I,RP]

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


Joined: 02 July 2009
Location: Netherlands
Online Status: Offline
Posts: 13
Posted: 03 July 2009 at 3:16am | IP Logged  

Ik works. Thank you very much Anton!
Back to Top View Sa1k0's Profile Search for other posts by Sa1k0
 

Sorry, you can NOT post a reply.
This topic is closed.

  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