This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: Old to new redirects with different query
Author
Message |
richr45
Groupie


Joined: 29 July 2009
Location: United Kingdom
Posts: 48
Posted: 12 February 2012 at 3:52am

Hi, I wonder if you can help.

I have this redirect that works great

#301 redirect to a new-URL
RewriteCond %{QUERY_STRING} ^pdfirstname=([^&]+)&pdlastname=([^&]+)&profileid=([^&]+)$
RewriteRule ^college/info\.asp$ art/%1_%2_%3? [NC,R=301,L]

#rewrite back to old-URL
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^art/([^_]+)_([^_]+)_([^_]+)$ college/info.asp?pdfirstname=$1&pdlastname=$2&profileid=$3 [NC,L]

I have some old pages

http://www.site.com/college/info.asp?profileid=5161&gallery=Figurative

You can see these reach the same page but with differnt query strings. The only similarity is the profileid. Not sure its possible when the queries are different!

Is it possible to re-direct these to the same address as the query redirects at the top of the page.  ie

RewriteRule ^college/info\.asp$ art/%1_%2_%3? [NC,R=301,L]

Thanks for any help

Richard

Back to Top Visit richr45's Homepage
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 14 February 2012 at 5:18am

Hello,

It's possible, but you have less parameters. What kind of scenario do you see?

Regards
Andrew
Back to Top
 

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

Printable version Printable version