goFrendiAsgard / No-CMS

No-CMS, A CodeIgniter Based CMS Framework
299 stars 199 forks source link

real_base_url error ? #113

Closed kampar closed 9 years ago

kampar commented 9 years ago

Dear all,

when I try to make a subsite with an alias, my browser raise 404 error when I navigate to that subsite on its alias (mydomain.com), not it's sub-directory alias (e.g: http://mymainNoCMS.com/site-mydomain) all the javascript and css assets are pointed to wrong domain, only com without my domain ...

all the rest (e.g, images, favicon, are okay)

this is my Google Chrome console log:

Navigated to http://mydomain.com/
(index):1 GET http://com/assets/grocery_crud/js/_cache_e3b57e0216140bd61ffcff37822de64d.js 
(index):1 GET http://com/assets/bootstrap/css/_cache_5b8a7c172e391b3b2de2df8e4205894c.css 
(index):1 GET http://com/themes/neutral/assets/default/_cache_aace6588d919dcdd856334d0e24c9406.css 

after tinkering a few hours, it seems this following line is the source of this error

            $real_base_url = str_ireplace('://'.CMS_SUBSITE.'.',  '://', $real_base_url);

it's line 170 /application/libraries/CMS_Asset.php when i commented this line, it's working as I hope, my subsite assets are now pointed to correct domain (mydomain.com, not com only)

I'm new with No-CMS and don't know what $real_base_url is for ... is it okay if I do comment that line?

goFrendiAsgard commented 9 years ago

confirmed. This is a bug to be fixed soon. EDIT: Hi kampar, how do you add alias to your subsite? selection_056

goFrendiAsgard commented 9 years ago

Hi again, please use this one: https://github.com/goFrendiAsgard/No-CMS/tree/fcaa3e5dff786981089238359c921e5e796f897b.

I'm now closing the issue, but please open the issue again if you find the problem still persist.

Thx