Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert Apache Regular Expression to Perl Regular Expression

Status
Not open for further replies.

Zeroanarchy

Technical User
Jun 11, 2001
630
AU
Hi I am a bit stuck and was wondering if someone might be able to help.

I would normally work with apache but in this case I am working with IIS Ionic. The issue is the software I am using only excepts Perl Regular Expression and I can not understand why the following regular expression will not work. Can anyone help please. I have searched the web and tried several alternatice none which worked, so really apreciate any help offered.

Code:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*main\.htm\ HTTP/
RewriteRule ^(([^/]+/)*)main\.htm$ [URL unfurl="true"]http://www.mywebsite.com/Home/$1[/URL] [R=301,L]

Thanks in advance.

Cheers

[afro]ZeroAnarchy
Experience is a wonderful thing. It enables you to recognize a mistake
when you make it again.
 
I couldn't really follow what you were trying to get. If you can tell me from what you're trying to get what that'll help.
val = abcd.htm
result = htm
 
You need to describe in detail what you are trying to match.



------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top