Solved

find and replace used in 301 redirect

Posted on 2014-10-09
1
158 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 51

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Google always has something new and amazing up its sleeve, and the most current thing that they have been working on is another step in the evolution of Google Search, from machine learning to its brilliant successor, deep learning.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

726 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