This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: conditional http to https redirect Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
bhavnik
Newbie
Newbie


Joined: 21 January 2011
Online Status: Offline
Posts: 3
Posted: 21 January 2011 at 8:13am | IP Logged Quote bhavnik

Hi all,

Consider below urls

http://localhost/mysite/dir1/a.aspx
http://localhost/mysite/dir1/dir2/b.aspx
http://localhost/mysite/dir1/a.aspx?q=1&dir=2
http://localhost/mysite/images/a.jpg
http://localhost/mysite/dir1/dir2/b.aspx?q=1&dir=2
http://localhost/mysite/dir1/a.pdf

I need to write a "RedirectCond" so that it only meets .aspx page, not any other resources. Note that, a page can be located at any folder hierarchy and can have querystrings as well.

I can write something like below, but it is very wild regex which can match something more, not sure.

RewriteCond    %{PATH_INFO}    (.aspx)   

My question is, is there anything else already available which detects file extension and then can be utilized in RewriteCond directive?

Please suggest.


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


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 24 January 2011 at 3:55am | IP Logged Quote Anton

Please consider the following condition:

RewriteCond URL .*\.aspx

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