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

    I have recieved a site with about 20 static html pages.
    Each one has about 10 local links (?) i.e. <a href="#123">
    The problem is that once they're clicked, i get thrown out to domain.we/,
    instead of jumping to the link.
    FURL is done via .htaccess rewrite:

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
    


    I have read
    http://wiki.modxcms.com/index.php/Link_To_Another_Page
    and

    href="[~intro~]"
    


    href="/[~intro~]"
    


    href="[(base_url)][~7~]"
    


    are not parsed at all i.e. the link looks like: domain.we/[(base_url)][~7~]
    Having tried the following:

    href="[[(base_url)]][[~7~]]"
    


    I get thrown out to domain.we
    Googling this problem brought about unrelavant results.

    My two questions:
    1) How can i actually make a local link work?
    2) How can i automatically update all of my static content local links? [ed. note: f16d5s last edited this post 14 years, 7 months ago.]
      • 1343 ☆ A M B ☆
      • 2,213 Posts
      Linking to pages in MODX you would use the following format:

      Evo: [~#~]
      Revo: [ [~#] ]

      If your links aren't working make sure you have the base tag added as well (to head of template)

      Evo: <base href="[(site_url)]" />
      Revo: <base href="[ [++site_url] ]" />

      (Remove the space between the [] for revo. Added so forums don't process tags)
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 3749
        • 24,544 Posts
        Yes, but linking to static non-MODX pages and back from static pages is more complex because of the way MODX rewrites the URLs. The best solution would be to import those pages into MODX and use the kind of tags AMDbuilder suggests.


        ---------------------------------------------------------------------------------------------------------------
        PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
        MODX info for everyone: http://bobsguides.com/modx.html
          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