Sorry, I forgot it. I added this code to Custom HTTPD Configurations in directadmin, but it show me an error. The error is:
nginx: [emerg] invalid number of arguments in "rewrite" directive in /usr/local/directadmin/data/users/admin/nginx.conf:21
nginx: configuration file /etc/nginx/nginx.conf test failed
The code I entered is:
location / {
if (!-e $request_filename){
rewrite \.(js|css|jpeg|jpg|gif|png|ico|map)(\?|$) /404error.php break;
}
if (!-e $request_filename){
rewrite ^(.*)$ /index.php break;
}
if ($http_host !~ "^www.mydomain.com$"){
rewrite ^/(.*) https://forums.mydomain.com/index.php/$1 [L, QSA] redirect;
}
}
The problem seems to be this:
rewrite ^/(.*) https://forums.mydomain.com/index.php/$1 [L, QSA] redirect;
?