.htaccess question for redirecting old URLs that google still has,  for revamped web site

willsherwood
willsherwood used Ask the Experts™
on
what is the htaccess statement(s) i should use to redirect the below URL that a google search shows that is from the former CMS website URLs?

http://www.domain.com/template.isp*

where my use above of  *  is a wildcard that is to match anything that follows the stub of this URL
an actual example is:
http://www.domain.com/template.jsp?doc=domain&c=Meet+the+Team&wiz=0&page=Meet+the+Team

and this needs to redirect to:  http://www.domain.com/about-us

thank you!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
You can try this one

RewriteRule ^template\.jsp$ /about-us? [L,R=301]

Author

Commented:
works perfectly.  much appreciated!

Author

Commented:
the client now wants to  replicate specific pages to redirect.
the previous solution worked fine, but i had specified "wildcard"  for the rest of the URL.

how can i quote the following example URL source to be redirected to the same page?
http://www.Domain.com/template.jsp?doc=center&c=Meet+the+Team&wiz=0&page=Meet+the+Team   
       -->   Domain.com/meet-the-team

i tried putting backslashes before all the punctuation/special chars, but it didn't work.

RewriteRule ^template\.jsp\?doc\=center\&c\=Meet\+the\+Team\&wiz\=0\&page\=Meet\+the\+Team$ /meet-the-team/? [L,R=301]

thank you!
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

what are special pages please specify condition.
New rule has to be written above my previous comments

RewriteRule ^template\.jsp$ /about-us? [L,R=301]

Author

Commented:
for testing, i did replace your previous rule, but when my new try did not work, i put your original back in which works for about us.
please advise for all the special characters in the specific long URL (no wildcards)
How to decide whether it has to redirected to  about-us or meet-the-team
Please specify that

Author

Commented:
it will be a series of 7 specific (complete) source URLs that redirect to specific target URLs.

i just need to get ONE to work, so i can then duplicate/edit  a few chars difference.

the pattern match includes no programming nor wildcards.  a full URL

Author

Commented:
p.s.  i just want to get this one specific rule working for now.

RewriteRule ^template\.jsp\?doc\=center\&c\=Meet\+the\+Team\&wiz\=0\&page\=Meet\+the\+Team$ /meet-the-team/? [L,R=301]

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial