Answer the question
In order to leave comments, you need to log in
Plant a handy Fake SMTP?
Prompt for a convenient console Fake SMTP to store letters.
No extra settings. Under Linux.
greenmail didn't find it to save to files
Looked at DevNullSmtp - almost, but too primitive, no configuration. I would like the possibility of a simple filter, for example, search by text with the ability to either name files or sort them into folders.
Ideally, in general, the execution of a small script for each received letter.
Answer the question
In order to leave comments, you need to log in
RewriteCond %{QUERY_STRING} (^|&)number\=(.+)($|&)
RewriteRule ^news\.php$ /news%2/? [L,R=301]
(^|&)...... ($|&)
- there may be more than one get request, for this we use this construction, or ? or & %{QUERY_STRING}
- is not part of the url and stands out just like that %2
- an analogue of $2 if I needed the second bracket from the rudder, and %2 takes the second bracket from the conda. /?
- removes get parameters (.+)
- 1 or more characters in a group
RewriteCond %{QUERY_STRING} ^number=(\d+)
RewriteRule ^(news)\.php$ https://www.site.ru/$1%1/? [R=301,L]
RewriteCond %{THE_REQUEST} " /(news)\.php\?number=(\d+)"
RewriteRule ^ https://www.site.ru/%1%2/? [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question