Avatar of willsherwood
willsherwood

asked on 

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

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!
Apache Web Server

Avatar of undefined
Last Comment
willsherwood
ASKER CERTIFIED SOLUTION
Avatar of Insoftservice inso
Insoftservice inso
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of willsherwood
willsherwood

ASKER

works perfectly.  much appreciated!
Avatar of willsherwood
willsherwood

ASKER

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!
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]
Avatar of willsherwood
willsherwood

ASKER

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
Avatar of willsherwood
willsherwood

ASKER

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
Avatar of willsherwood
willsherwood

ASKER

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]
Apache Web Server
Apache Web Server

The Apache HTTP Server is a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards. Typically Apache is run on a Unix-like operating system, but it is available for a wide variety of operating systems, including Linux, Novell NetWare, Mac OS-X and Windows. Released under the Apache License, Apache is open-source software.

21K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo