views:

9

answers:

0

Anyone can help me fix below code? I did an auto convertion but many essentials were not converted

RewriteEngine On

RewriteCond %{REQUEST_METHOD} ^GET
RewriteCond %{DOCUMENT_ROOT}/website/var/assets%{REQUEST_URI} -f
RewriteRule ^(.*)$ /website/var/assets%{REQUEST_URI} [PT,L]

RewriteRule ^website/var/tmp.* - [PT,L]
RewriteRule ^website/var/assets.* - [PT,L]
RewriteRule ^plugins/.*/static.* - [PT,L]

RewriteRule ^website/var/.*$ / [F,L]
RewriteRule ^plugins/.*$ / [F,L]

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

--- auto converted

if ($request_method ~ "^GET"){
set $rule_0 1$rule_0;
}
if (-f $document_root/website/var/assets$uri){
set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
rewrite ^/(.*)$ /website/var/assets$uri last;
}
#ignored: "-" thing used or unknown variable in regex/rew 
#ignored: "-" thing used or unknown variable in regex/rew 
#ignored: "-" thing used or unknown variable in regex/rew 
return 403;
break;
return 403;
break;
if (-e $request_filename){
set $rule_6 1;
}
if ($request_filename ~ "-l"){
set $rule_6 1;
}
if (-f $request_filename){
set $rule_6 1;
}
if ($rule_6 = "1"){
#ignored: "-" thing used or unknown variable in regex/rew 
}
rewrite ^/.*$ /index.php last;