0

I have create a project in codeigniter.I had set a base_url in config.php as http://testproject.com/test/

Now I can able access the application with that url (http://testproject.com/test/) and also I have able to login,but I cannot able to access the application with the URL www.testproject.com/test/ just here I have add a www before domain name.

I am getting the error as "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http".

In config.php I have set as a base url http://www.testproject.com/test/ now I have able to access the application with the url www.testproject.com/test/

But cannot able to access with the url "http://testproject.com/test/" getting the error as "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http".

I have set as uri_protocol 'AUTO';

$config['uri_protocol'] = 'AUTO';  

My .htaccess file looks like this

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|assets|images|css|js|robots\.txt)
RewriteRule ^(.*)$ ./index.php?/$1 [L,QSA]

Any one help me on this issue

Poobalan
  • 47
  • 7

0 Answers0