We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37117
    • 24 Posts
    Hi

    At the beginning, sorry for my English smiley

    Recently i have decided to make new site for my business, and for this purpose i used modx revolution (for the 1st time, for client I use evolution).

    Everythnig works great! Except one little tiny thing.
    For the installation i`ve created /www directory on my server and redirected exampledomain.com to it. When I`m on main page and want to navigate to other subpages (ex. domain.com/service1 etc) everything works perfectly (even when i`m navigating through subpages, ex. from domain.com/service1 to domain.com/service2). Problem occurs when i want to return to main page. Wayfinder (getResources also) constantly adds /www to my exampledomain.com (it looks like this exampledomain.com/www), but main page has no /www. Strangely subpages are always ok.

    I`m thinking about hard coding site_url to http://domain.com, but i don`t know how. If anybody could help me with this I would be greatful.

    Add.
    I`ve forgot to mention that problem occurs only when FURL are enabled ;(

    Chriss [ed. note: dfaktor last edited this post 12 years, 5 months ago.]
    • You should be able to manually adjust this in your config file by changing the MODX_BASE_URL and MODX_SITE_URL values. Or, you can do so by adding System and/or Context Settings for base_url, and site_url. Make sure your site_url value ends with a / and that base_url is just / (IOW remove the www/ from both).
        • 37984
        • 215 Posts
        VERY curious about this. I need to be able to make my entire site covered by an SSL certificate, and unfortunately due to problems inherent with Network Solutions' shared servers, I cannot do this via .htaccess (it creates an infinite loop). If I could manually code site_url to https then my problem would be solved. PLEASE HELP!
          Jesse Couch
          MODX Aficionado, Front-End Designer & Developer
          http://www.designcouch.com
          • 39932
          • 483 Posts
          "site_url" is a System Setting and you can always adjust it, even on a per Context level. Just open System Settings and do a search for "site_url".

          If you cannot get to your manager, adjust your .htaccess to use "http://" first. Then login to your manager, then change "site_url" then edit your .htaccess. Then refresh the cache.
            Website: Extended Dialog Development Blog: on Extended Dialog
            Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
            Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

            Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".
            • 37984
            • 215 Posts
            Fuzzical Logic - I'm afraid it isn't a system setting in Revolution. It is set dynamically. I had to go into my config file and hardcode the url that I wanted.
              Jesse Couch
              MODX Aficionado, Front-End Designer & Developer
              http://www.designcouch.com
            • You can create a system setting for it.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 37117
                • 24 Posts
                Problem solved! smiley

                I`ve compared config.inc.php from problematic server with other (non problematic) installations and found that paths for MODX_CONNECTOR_PATH, MODX_MANAGER_PATH were set different.

                Problematic server:

                if (!defined('MODX_CORE_PATH')) {
                    $modx_core_path= '/website_folder/core/';
                    define('MODX_CORE_PATH', $modx_core_path);
                }
                if (!defined('MODX_PROCESSORS_PATH')) {
                    $modx_processors_path= '/website_folder/core/model/modx/processors/';
                    define('MODX_PROCESSORS_PATH', $modx_processors_path);
                }
                if (!defined('MODX_CONNECTORS_PATH')) {
                    $modx_connectors_path= '/website_folder/connectors/';
                    $modx_connectors_url= '/website_folder/connectors/';
                    define('MODX_CONNECTORS_PATH', $modx_connectors_path);
                    define('MODX_CONNECTORS_URL', $modx_connectors_url);
                }
                if (!defined('MODX_MANAGER_PATH')) {
                    $modx_manager_path= '/website_folder/manager/';
                    $modx_manager_url= '/website_folder/manager/';
                    define('MODX_MANAGER_PATH', $modx_manager_path);
                    define('MODX_MANAGER_URL', $modx_manager_url);
                }
                if (!defined('MODX_BASE_PATH')) {
                    $modx_base_path= '/website_folder/';
                    $modx_base_url= '/website_folder/';
                    define('MODX_BASE_PATH', $modx_base_path);
                    define('MODX_BASE_URL', $modx_base_url);

                }

                Non problematic:

                if (!defined('MODX_CORE_PATH')) {
                    $modx_core_path= '/website_folder/core/';
                    define('MODX_CORE_PATH', $modx_core_path);
                }
                if (!defined('MODX_PROCESSORS_PATH')) {
                    $modx_processors_path= '/website_folder/core/model/modx/processors/';
                    define('MODX_PROCESSORS_PATH', $modx_processors_path);
                }
                if (!defined('MODX_CONNECTORS_PATH')) {
                    $modx_connectors_path= '/website_folder/connectors/';
                    $modx_connectors_url= '/connectors/';        <--------------- DIFFERENT PART
                    define('MODX_CONNECTORS_PATH', $modx_connectors_path);
                    define('MODX_CONNECTORS_URL', $modx_connectors_url);
                }
                if (!defined('MODX_MANAGER_PATH')) {
                    $modx_manager_path= '/website_folder/manager/';
                    $modx_manager_url= '/manager/';             <--------------- DIFFERENT PART
                    define('MODX_MANAGER_PATH', $modx_manager_path);
                    define('MODX_MANAGER_URL', $modx_manager_url);
                }
                if (!defined('MODX_BASE_PATH')) {
                    $modx_base_path= '/website_folder/';
                    $modx_base_url= '/';             <--------------- DIFFERENT PART
                    define('MODX_BASE_PATH', $modx_base_path);
                    define('MODX_BASE_URL', $modx_base_url);
                }


                All i had to do was to set paths like they were set in non problematic servers.



                Best regards and thanks for your help!
                Chriss
                  • 39932
                  • 483 Posts
                  It seems when I removed a post, it removed some others... If this created a lapse in information or understanding, I apologize.
                    Website: Extended Dialog Development Blog: on Extended Dialog
                    Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
                    Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

                    Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".