How to make redirection for pages like .../page/{любое число} so that it works only on numbers, and .../page/{текст} skipped?RedirectMatch 301 /page/.* works on all characters.
2 answers
RewriteRule ^page\/([0-9]*)$ http://example.com/$1 [R=301,L] [0-9] - any number$ - to the end of the url. If you simply put [0-9]* any url will do, mk * can mean 0 occurrences
- That is, the initial result is: RedirectMatch 301 / page \ / (0-9) * $ http: // {where_nado}? I did not work ... - Tarasovych
- one@Tarasovych Rewrote through
RewriteRule; withRedirectMatchnot familiar - Crantisz
|
This redirect helped
RedirectMatch 301 /page/[0123456789]+$ http://anotherpage |