We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 209
    • 11 Posts
    Hi
    I am new to MODx and I must admit that it is an amazing CMS and thanks for it.
    But I have one issue with Friendly URLs - I installed the sample database to play with and now I started trying the Friendly URLs function - I set:
    Prefix for friendly URLs: index.php?q=
    Suffix is empty
    Use friendly aliases: Yes
    Use friendly alias path: Yes
    Allow duplicate aliases: No
    Automatically generate alias: Yes

    Now URLs follows this and It works fine for documents on the top in the Document tree (containers). But when i click on link which is inside the container then i get 404 error.
    So in the sample database, when i click on Features link (which looks like this: http://127.0.0.1/modxs/index.php?q=features ) the page displays correctly, but when I click on Ajax link (http://127.0.0.1/modxs/features/index.php?q=ajax ) inside the Features category i get 404 error - so what am I doing wrong?

    PS: both ht.access files are renamed to .htaccess
      • 26931
      • 2,314 Posts
      Hi there,

      did you rename your .htaccess file (so that it works), and change the rewrite base in it?...your installation is in a subdirectory, right?
      ...and try leaving the prefix part empty, you’ll have the alias-names instead.

      cheers, j
        • 22303 MODX Staff
        • 10,725 Posts
        Quote from: aa007 at Jan 18, 2009, 02:34 PM

        Prefix for friendly URLs: index.php?q=
        That is the problem. Remove that prefix; that is not at all a valid prefix. Prefix should generally be empty unless you have special requirements.
          • 209
          • 11 Posts
          Oh .. now I see - I was following this side http://wiki.modxcms.com/index.php/Friendly_URLs_Guide#Friendly_urls_with_mod_rewrite and I skipped that important detail...
          Well but now I have different question - in CMS I am using now, those Friendly URLs look like this: http://127.0.0.1/modxs/index.php?q=143-post-name
          and the 143 is the ID of the document. But I noticed that now if there is the second document with the same alias then there is a problem. So is there any way (except manual editing the alias) how to include the ID in the URL? - I want to have the URL style like I have now but this would be a serious problem...
          Thanks