?
Solved

find and replace used in 301 redirect

Posted on 2014-10-09
1
Medium Priority
?
163 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 2000 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

7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

Question has a verified solution.

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

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
There is a massive demand for content on the web right now, and it doesn't look like it's going to stop any time soon. But, if you are running a business blog, it's not just enough to offer your audience lots of content. It needs to be high-quality…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month12 days, 15 hours left to enroll

777 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