U
U
urght2015-08-07 20:18:02
htaccess
urght, 2015-08-07 20:18:02

How to make .htaccess cnc?

There is a url, for example: site.ru/ username /text/ id123456789
How to make it like this: site.ru/id123456789/
RewriteRule ^([az]+)/?$ /$1/text/$2 [L,QSA] - what -something like this

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
ShamblerR, 2015-10-26
@ShamblerR

Let's say you have username / text - this is any text. The
first group is everything up to ID, then the second group starts with id numbers from 0 to 9 at least 1 time until the end of the line

RewriteRule   ^(.*)(id[0-9]{1,})& http://site.ru/$2 [L,QSA]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question