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

    I've got angularjs app running on MODx website. There is some page with URL like

    localhost/www.mysite.com/angularapp/

    which contains the app.

    URLs inside app look like

    localhost/www.mysite.com/angularapp/category/1

    base href is set to /www.mysite.com/angularapp/

    Everything works fine, but I can not reach the subpages of the app directly.

    If I type localhost/www.mysite.com/angularapp/category/1 in address bar, I get to modx start page. But if I go to the link via app - it works.

    What did I miss ?

    Thank you
      • 3749
      • 24,544 Posts
      The MODX .htaccess file loads the MODX site's home page (site_start), whenever the requested URL is not found. That might prevent the Angular router from doing its job.

      It might work to put an .htaccess file in your angularapp folder with just this line:

      RewriteEngine Off
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting