user882670
user882670

Reputation:

Replace URL pattern with 4 numbers after word

How to replace:

domain.com/e-books/1234-etc  

By:

domain.com/artigos/1234-etc

I'm trying:

RewriteRule ^e-books(\d{4}-.*)$ /artigos/(\d{4}-.*)$1 [R=301,L]

EDIT: And this:

RewriteRule ^e-books(\d{4}-.*) /artigos/$1 [R=301,L]

Upvotes: 3

Views: 41

Answers (1)

Amit Verma
Amit Verma

Reputation: 41249

RewriteRule ^e-books/(.+)$ /artigos/$1 [NC,R,L]

Clear your browser'cache before testing this.

Upvotes: 1

Related Questions