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 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: conditional http to https redirect
Author
Message |
bhavnik
Newbie


Joined: 21 January 2011
Posts: 3
Posted: 21 January 2011 at 8:13am

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
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 24 January 2011 at 3:55am

Please consider the following condition:

RewriteCond URL .*\.aspx

__________________
Regards,
Anton
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version
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