javascript - .htaccess for cdn & staging died -


ok i'm attempting use 2 .htaccess files in order load content on: http://staging.rjs-creative.com , 1 on http://cdn.rjs-creative.com in order display fonts on staging.rjs-creative.com/test.php cdn.rjs-creative.com/fonts/ - doesn't seem working , i'm going crazy here!

my access log via cdn subdomain shows:

[14/may/2015:11:10:53 -0400] "get /fonts/hoverage-vintage.otf http/1.0" 200 582 "cdn.rjs-creative.com/css/stylesheet.min.css" "mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, gecko) chrome/42.0.2311.135 safari/537.36"

the error log via staging subdomain shows:

[thu may 14 10:26:20 2015] [error] [client 5.189.144.88] directory index forbidden options directive: /var/www/vhosts/rjs-creative.com/httpdocs/

my cdn htaccess follows..

header unset etag fileetag none  <filesmatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|mp3|mp4)$">      header set cache-control "public"      header set expires "thu, 15 apr 2018 20:00:00 gmt"      header set last-modified "thu, 7 nov 2013 12:00:00 gmt"  </filesmatch>  <filesmatch "\.(html|htm|xml|txt|xsl)$">      header set cache-control "max-age=7200, must-revalidate"  </filesmatch>  <filesmatch "\.(js|css)$">      setoutputfilter deflate      header set expires "thu, 15 apr 2018 20:00:00 gmt"  </filesmatch>  adddefaultcharset utf-8 header append vary: accept-encoding addoutputfilterbytype deflate text/plain  addoutputfilterbytype deflate text/html  addoutputfilterbytype deflate text/xml  addoutputfilterbytype deflate text/css  addoutputfilterbytype deflate application/xml  addoutputfilterbytype deflate application/xhtml+xml  addoutputfilterbytype deflate application/rss+xml  addoutputfilterbytype deflate application/javascript  addoutputfilterbytype deflate application/x-javascript  <ifmodule mod_gzip.c>     mod_gzip_on       yes     mod_gzip_dechunk  yes     mod_gzip_item_include file      \.(html?|txt|css|js|php|pl|webm)$     mod_gzip_item_include handler   ^cgi-script$     mod_gzip_item_include mime      ^text/.*     mod_gzip_item_include mime      ^application/x-javascript.*     mod_gzip_item_exclude mime      ^image/.*     mod_gzip_item_exclude rspheader ^content-encoding:.*gzip.*  </ifmodule>  <ifmodule mod_expires.c>     expiresactive on     expiresdefault "access plus 1 year"  </ifmodule>  header set access-control-allow-origin "*" 

now staging htaccess follows...

<filesmatch ".(eot|ttf|otf|woff)">       header set access-control-allow-origin "*"  </filesmatch>  header unset etag fileetag none  <filesmatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|mp3|mp4)$">      header set cache-control "public" header set expires "thu, 15 apr 2018 20:00:00 gmt"      header set last-modified "thu, 7 nov 2013 12:00:00 gmt"  </filesmatch>  <filesmatch "\.(html|htm|xml|txt|xsl)$">      header set cache-control "max-age=7200, must-revalidate"  </filesmatch>  <filesmatch "\.(js|css)$">      setoutputfilter deflate header set expires "thu, 15 apr 2018 20:00:00 gmt"  </filesmatch>   adddefaultcharset utf-8 header append vary: accept-encoding  <ifmodule mod_mime.c>     addtype application/vnd.ms-fontobject   eot     addtype application/x-font-ttf          .ttf     addtype font/opentype                   otf     addtype application/x-font-woff         woff     addtype image/svg+xml                   svg svgz     addencoding gzip                        svgz  </ifmodule>  <ifmodule mod_deflate.c>     addoutputfilterbytype deflate image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype  </ifmodule>  addoutputfilterbytype deflate text/plain  addoutputfilterbytype deflate text/html  addoutputfilterbytype deflate text/xml  addoutputfilterbytype deflate text/css  addoutputfilterbytype deflate application/xml  addoutputfilterbytype deflate application/xhtml+xml  addoutputfilterbytype deflate application/rss+xml  addoutputfilterbytype deflate application/javascript  addoutputfilterbytype deflate application/x-javascript  <ifmodule mod_gzip.c>     mod_gzip_on       yes     mod_gzip_dechunk  yes     mod_gzip_item_include file      \.(html?|txt|css|js|php|pl)$     mod_gzip_item_include handler   ^cgi-script$     mod_gzip_item_include mime      ^text/.*     mod_gzip_item_include mime      ^application/x-javascript.*     mod_gzip_item_exclude mime      ^image/.*     mod_gzip_item_exclude rspheader ^content-encoding:.*gzip.*  </ifmodule>  <ifmodule mod_expires.c>     expiresactive on     expiresdefault "access plus 1 year"  </ifmodule>  <ifmodule mod_headers.c>     header set connection keep-alive  </ifmodule>  header add access-control-allow-origin "*"  header add access-control-allow-headers "origin, x-requested-with, content-type"  header add access-control-allow-methods "put, get, post, delete, options" 

i in no way brilliant when comes using .htaccess files, company work for's head developer guided me use same .htaccess layout , seems work fine when develop websites there.

i have set .htaccess 301 redirect works, show htaccess initializing. eugh.


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -