My website is working when it's typed http://mywebsite.com, but it's not working when typed www.mywebsite.com, because it retrieves me an error:
- Code: Select all
Font from origin 'http://mywebsite.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.mywebsite.com' is therefore not allowed access.
My VirtualHost configuration is the following:
- Code: Select all
<VirtualHost *:80>
ServerName mywebsite.com
documentRoot "C:/xampp/htdocs/mywebsite"
</VirtualHost>
I can put the "www" working, but that would mean that "http://" won't work anymore.
I'm wondering if this is a Xampp problem or a PHP problem? In my configuration file of CodeIgniter I have:
- Code: Select all
/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
| http://example.com/
|
| If this is not set then CodeIgniter will guess the protocol, domain and
| path to your installation.
|
*/
$config['base_url'] = 'http://mywebsite.com/';
Thank you.