Help translating a htaccess redirect from Apache to OLS (WordPress permalink)

#1
I can't seem to find the correct way to add a redirect line in a htaccess file, after changing the WordPress permalink structure.
Basically I want to translate this Apache line to OLS:
Code:
RewriteRule ^[0-9]{4}/[0-9]{2}/[0-9]{2}/(.*)$ /$1 [R=301,L]
How hard would it be to build a tool that translates Apache htaccess code to OLS?
 
#5
Thanks, that's very helpful!
Shouldn't I also set the RewriteLog directive?
Something like:
Code:
# Log to a file:
RewriteLog "/usr/local/var/apache/logs/rewrite.log"
If not, where would I look for the logged information?
 
#7
That's what I read on the Litespeed documentation page, but it's not showing up in the error log. I'll try restarting and rebuilding everything. One thing I did different, I used Directadmin's tool (under Custom 5) to add the logLevel line. So mine looks like this:

Code:
  rewrite  {
    enable                  1
    autoLoadHtaccess        1
    # Mail auto configuration (Thunderbird)
    RewriteRule ^/\.well-known/autoconfig/mail/config-v1\.1\.xml$ http://dainternal/$0 [P,L]
rules <<<END_rules
RewriteCond %{HTTP_USER_AGENT} (PetalBot|MJ12bot|SemrushBot|Mediatoolkitbot|Mail\.RU_Bot|DotBot|Superfeedr|CriteoBot|linkfluence) [NC]
RewriteRule ^.* - [F,L]
END_rules
logLevel                9
  }
 
Top