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: Rewrite rule to match GUID?
Author
Message |
earljj
Newbie


Joined: 06 April 2010
Location: United States
Posts: 18
Posted: 22 February 2011 at 8:24am

I'm having trouble figuring out how to match the following URL:

/_layouts/feed.aspx?xsl=1&web=%2FMediaRelations&page=b4a27b61-d4d0-4eee-8b0c-4e7d57d340a8&wp=1d1c481a-1cf2-4772-b664-481cf660c769

I tried just prefixing the whole string with a $, and I also tried escaping the ? % - = characters. Regextest.exe tells me I have a bad match.

What am I missing?

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 23 February 2011 at 4:47am

Could you please show the rule you are trying to use.
And please confirm you are using ISAPI_Rewrite v2.

__________________
Regards,
Anton
Back to Top
 
earljj
Newbie


Joined: 06 April 2010
Location: United States
Posts: 18
Posted: 23 February 2011 at 7:02am

I've gone through several different versions of the rule at this point, but here's the base:

RewriteRule ^_layouts/feed.aspx?xsl=1&web=%2FMediaRelations&page=b4a27b61-d4d0-4eee-8b0c-4e7d57d340a8&wp=1d1c481a-1cf2-4772-b664-481cf660c769 http://mysite.com/_layouts/feed.aspx?xsl=1&web=%2FMediaRelations&page=bbbcf240-2214-4624-8e01-ddc75c6ae6a5&wp=1a0aad98-76eb-42c3-a830-b8b4efc322d9 [NC,I,O,R=301,L]

Back to Top
 
earljj
Newbie


Joined: 06 April 2010
Location: United States
Posts: 18
Posted: 23 February 2011 at 7:03am

I apologize--it turns out that we're using ISAPI Rewrite version 3.1.

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 24 February 2011 at 2:54am

The rules for v3 will be as follows:

RewriteBase /
RewriteCond %{QUERY_STRING} ^xsl=1&web=\%2FMediaRelations&page=b4a27b61-d4d0-4eee-8b0c-4e7d57d340a8&wp=1d1c481a-1cf2-4772-b664-481cf660c769$ [NC]
RewriteRule ^_layouts/feed\.aspx$ http://mysite.com/_layouts/feed.aspx\?xsl=1&web=\%2FMediaRelations&page=bbbcf240-2214-4624-8e01-
ddc75c6ae6a5&wp=1a0aad98-76eb-42c3-a830-b8b4efc322d9 [NC,R=301,L]

Though I don't quite understand why are you trying to redirect to the same URL? What's the idea?

__________________
Regards,
Anton
Back to Top
 
earljj
Newbie


Joined: 06 April 2010
Location: United States
Posts: 18
Posted: 24 February 2011 at 7:40am

That worked--thank you very much!

As to what we're trying to do... Our site runs on SharePoint, and this page is an RSS feed of the content from our media relations page. SharePoint uses one .aspx page for all RSS feeds and just swaps out the GUIDs to display the appropriate content.

Due to some changes we made in the structure of our site, the GUID for the media relations page changed, but we want to make sure that people who were subscribed to the original feed continue to get updates. 

Thanks again for the help!

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