this my vhost.conf
<VirtualHost *:80>
<files xmlrpc.php>
order allow,deny
deny from all
</files>
ServerName www.myserver.com
ServerAlias myserver.com
DocumentRoot /var/www/vhosts/www.myserver.com
<Directory /var/www/vhosts/www.myserver.com>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
# AllowOverride None
#Order Allow,Deny
#Allow from All
#Deny from 124.43.19.230
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# Restrict access to PHP files from plugin and theme directories
RewriteCond %{REQUEST_URI} !^/wp-content/plugins/file/to/exclude\.php
RewriteCond %{REQUEST_URI} !^/wp-content/plugins/directory/to/exclude/
RewriteRule wp-content/plugins/(.*\.php)$ - [R=404,L]
RewriteCond %{REQUEST_URI} !^/wp-content/themes/file/to/exclude\.php
RewriteCond %{REQUEST_URI} !^/wp-content/themes/directory/to/exclude/
RewriteRule wp-content/themes/(.*\.php)$ - [R=404,L]
</IfModule>
RewriteCond %{REQUEST_URI} !^/wp-content/plugins/file/to/exclude\.php
RewriteCond %{REQUEST_URI} !^/wp-content/plugins/directory/to/exclude/
RewriteRule wp-content/plugins/(.*\.php)$ - [R=404,L]
RewriteCond %{REQUEST_URI} !^/wp-content/themes/file/to/exclude\.php
RewriteCond %{REQUEST_URI} !^/wp-content/themes/directory/to/exclude/
RewriteRule wp-content/themes/(.*\.php)$ - [R=404,L]
</Directory>
</VirtualHost>
when in browser i type www.myserver.com its go to my root directory and get index.php
but when i type myserver.com its go to default Apache web page (index.html) loading
so i add this line for rewrite
</VirtualHost>
<VirtualHost *:80>
ServerName myswever.com
ServerAlias *.myswever.com
Redirect permanent / https://www.myswever.com/
</VirtualHost>
but its not working its a word-press site how to rewire url
when some type myswever.com its should load www.myswever.com