I
I
ivksem2014-11-09 16:36:32
PHP
ivksem, 2014-11-09 16:36:32

How to fix file access error on server?

There is a site, suppose domain.ru . During development, such difficulties arose: the site has a module that requires all sorts of scripts and frames that are on this server. So, the bottom line: when you go to domain.ru , the module works properly, but if you go to the address www.domain.ru , then you get an error accessing the necessary scripts and frames of the type: "A request from an external source is blocked: The policy of one source prohibits reading a remote resource at http://domain.ru/xxx/templates/xxx .htm This can be fixed by moving the resource to the same domain or by enabling CORS."
I pray for help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AKalenik, 2014-11-09
@ivksem

in .htaccess:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.domain\.com
RewriteRule ^(.*)$ http://domain.com$1 [R=permanent,L]

there will be a redirect at the server level, should help

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question