Adding www to journal url

http://abc.xyz.edu.pk/ is the url for my journal. One journal hosted in subdomain of main website xyz.edu.pk. The subdomain is abc which is the journal name as well.

I have made all efforts to use it with www. I have added rules in .htaccess for this but not working by any means.
Kindly guide me the correct direction. Currently the site is accessible without www. If one adds www to it, gives error.

Thanks

This is actually a server configuration issue, not an OJS issue. Assuming you are using Apache, it is probably related to your name-based virtualhost configuration: Name-based Virtual Host Support - Apache HTTP Server Version 2.2

See particularly the documentation on ServerName and ServerAlias.