I've read that MODX Cloud doesn't support .htaccess files.
This means that I cannot set the http headers in the htaccess file to: Header set X-UA-Compatible "IE=edge,chrome=1"
I need this rule to prevent the use of a meta tag for this. The meta tag will do the same job, but will not validate, that's why I'm not keen on using it.
So is there a way to set these headers while still using the Cloud?
-
☆ A M B ☆
- 3,141 Posts
Something along these lines should work with the url rewrites box in Cloud (untested);
location / {
add_header X-UA-Compatible IE=edge,chrome=1;
try_files $uri $uri/ @modx-rewrite;
}
And for adding expires to assets (untested again):
location/assets/ {
expires 7d;
try_files $uri $uri/ @modx-rewrite;
}
location / {
try_files $uri $uri/ @modx-rewrite;
}
(
http://wiki.nginx.org/HttpHeadersModule)
Also it was mentioned that they are working on some documentation, which i think is badly needed.
It's being reviewed so will likely come online real soon.
-
MODX Staff
- 730 Posts
Quote from: markh at Jan 16, 2013, 08:19 AM
location / {
add_header X-UA-Compatible IE=edge,chrome=1;
try_files $uri $uri/ @modx-rewrite;
}
That add_header in Mark's example actually (not sure just why) does not work in the location / {} block in Cloud. It works outside of it or in other location blocks though. So, try
add_header X-UA-Compatible IE=edge,chrome=1;
location / {
try_files $uri $uri/ @modx-rewrite;
}
Documentation being pushed to the website very very soon
-
☆ A M B ☆
- 3,141 Posts