MyBB Community Forums

Full Version: how to move the images directory, JS, CSS into a subdomain
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
This problem has not been resolved, please help Huh
You should assign cdn.domain.com as CNAME record to the name provided by the CDN provider. That should resolve it.

(2013-05-29, 02:23 PM)SunDi3yansyah Wrote: [ -> ]
(2013-05-29, 11:03 AM)thebobo1 Wrote: [ -> ]Hi SunDi3yansyah,
you can set some paths in ACP > Configuration:
1. Server and Optimization Options > Uploads Path => "./uploads"
2. User Registration and Profile Options > Avatar Upload Path => "./uploads/avatars"

and in ACP > Templates & Style > <your theme>:
3. Image Directory => "images/learn"
4. Board Logo => "images/learn/logo.png"

All uploads (1.) are in a single directory, there could be a performance problem if your users make many uploads (e.g. > 20.000 files, it depends on OS...)

okay
but how to CSS and javascript Huh

You can move javascript files to another domain to improve site loading speed and you will need to update the javascript files location in all the templates to make it work.

For CSS,

You should copy the css entries from admin CP and place it in .css files.

{$stylesheets} in the headerinclude template should be replaced with the following css entries:

<link type="text/css" rel="stylesheet" href="http://cdn.domain.com/filename.css"/>
(2013-10-23, 07:04 AM)itsmegogo Wrote: [ -> ]You can move javascript files to another domain to improve site loading speed and you will need to update the javascript files location in all the templates to make it work.

For CSS,

You should copy the css entries from admin CP and place it in .css files.

{$stylesheets} in the headerinclude template should be replaced with the following css entries:

<link type="text/css" rel="stylesheet" href="http://cdn.domain.com/filename.css"/>



to the problem it has been successful in my site
visit http://www.kampoeng.co.id/
[Image: p27b.png]

which is to be obstacles lempiran system and upload the folder, it does not work
may have to change the php code of the function
(2013-10-23, 05:04 PM)SunDi3yansyah Wrote: [ -> ]
(2013-10-23, 07:04 AM)itsmegogo Wrote: [ -> ]You can move javascript files to another domain to improve site loading speed and you will need to update the javascript files location in all the templates to make it work.

For CSS,

You should copy the css entries from admin CP and place it in .css files.

{$stylesheets} in the headerinclude template should be replaced with the following css entries:

<link type="text/css" rel="stylesheet" href="http://cdn.domain.com/filename.css"/>



to the problem it has been successful in my site
visit http://www.kampoeng.co.id/
[Image: p27b.png]

which is to be obstacles lempiran system and upload the folder, it does not work
may have to change the php code of the function

I see you have made changes to the js files but I cant figure out what you are trying to say Sad
I mean like this

I have problems when changing directory /upload/
either uploading an avatar or attachment

for example
www.domain.com/images/avatars/avatar_1.jpg
and
www.domain.com/attachment.php?thumbnail=1

This is converted into
http://cdn.domain.com/images/avatars/avatar_1.jpg
and
http://cdn.domain.com/attachment.php?thumbnail=1
I dont think it will work out that way outside of Mybb's domain. I am curious on how it can be done.
This is a silly thing to do but it is very unique, just like facebook they do not put the picture on the main domain but different domain Big Grin
Pages: 1 2 3