R
R
Ruslan Makarov2015-12-05 16:21:05
Apache HTTP Server
Ruslan Makarov, 2015-12-05 16:21:05

How to replace url with htaccess?

On some pages, the url contains the following:
- site.ru/url /1/
- site.ru/url /2/
How to use htaccess to replace /1/, /2/ with /text1/, /text2/
Please tell me !

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2015-12-05
@2fox

RewriteEngine  on
RewriteBase /
RewriteRule ^url/([0-9]+)/?$  /url/text$1/ [R=permanent]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question