Answer the question
In order to leave comments, you need to log in
Are the words contained in the regular expression?
Good afternoon,
I'm trying to make a check for the url, whether the word exists in it or not.
http://site.ru/{msk|spb|region}/page
That is, the url should be site.ru, and between the curly braces something can be, but something is not.
It turns out such a url site.ru/page
And such site.ru/msk/page
Must be valid
I try like this:
/site.ru\/(?:^(?!msk|spb\/).*$)page/i
What - something nifiga, already tortured ...
Answer the question
In order to leave comments, you need to log in
regular season
it is not entirely clear what you are doing. if you just check the line or make htaccess
RewriteCond %{REQUEST_URI} ^(\/)*(msk|spb|region)*\/page
RewriteRule ^(.*)$ /go to? [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question