Michael,

Try this

RewriteRule ^([^\/]*)/sales/([0-9]){1}/(122)  mysite.com/sales/$2/$3/

Also, get the Regular Expressions Tester plugin for FireFox. It works great!




Wil Genovese
Sr. Web Application Developer/
Systems Administrator
CF Webtools
www.cfwebtools.com

wilg...@trunkful.com
www.trunkful.com

On Apr 16, 2011, at 1:24 PM, Michael Grant wrote:

> 
> I so suck at regex and redirects. I suck at lots of other stuff to, but
> that's irrelevant to this post.
> 
> The simple explanation of what I want is a url like :
> mysite.com/sales/1/122/?key=value&key2=value2 to redirect to just
> mysite.com/sales/1/122.
> 
> The ideal situation is anything that ends in /122 (mysite.com/*/122/) to
> redirect to mysite.com/sales/1/122/.
> 
> So first, strip the query string, second if it's /122 go to sales/1/122.
> 
> Any help would be greatly appreciated.
> 
> -Michael
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343988
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to