Solved

find and replace used in 301 redirect

Posted on 2014-10-09
1
157 Views
Last Modified: 2014-10-10
I would do this:
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^/category/CR101.html$ /category/CREST-101.html [R=301,nc]

Except I have about 200 pages all the same except the for the number. How can I write a single 301 redirect that will change the CR to CREST- ?
0
Comment
Question by:Gary Samuels
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 50

Accepted Solution

by:
Steve Bink earned 500 total points
ID: 40372232
Try this:
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^/?category/CR([0-9]+)\.html$ /category/CREST-$1.html [R=301,NC]

Open in new window

0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Read about how to approach blogging and about ways to do it right. Stand out from the crowd and let your knowledge be consumed by a large audience. This article aims to explain how your blog should look like,  the most important things to do while b…
In this blog, I will share you some basic tips for content marketing and to rank your website on Google.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question