We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26183
    • 36 Posts
    Hi, when I creat a page, it seems the url format ends up looking like this:

    http://nonameyet.net16.net/index.php?id=47


    I am trying to get the page title to appear at the end of the address,and not the page number. I have enabled friendly URL’s via the .htaccess file, and have followed the instructions below as follows, but to no avail:

    Friendly URLs via Changing the Prefix

    1. Log in to MODx Manager.
    2. In the manager, go to "Tools" -> "Configuration" (or "Administration" -> "System Configuration" pre 0.9.5)
    3. In the System configuration, choose "Friendly URL Settings" tab.
    4. Set "Use friendly URLs" to "Yes".
    5. Change "Prefix for friendly URLs" to "index.php?q=" (or index.php?page= etc.)


    Can someone help?

      • 6970
      • 19 Posts
      copy/paste this on your .htaccess
      if already on your file just overwrite.


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

        • 26183
        • 36 Posts
        Quote from: delabarra at Nov 06, 2009, 12:40 PM

        copy/paste this on your .htaccess
        if already on your file just overwrite.


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

        Thanks for the response, but I had the exact same thing in my .htacess file already. I still did the copy and paste, but there is still no change...

        Here is the whole of my .htaccess file, by the way:

        # For full documentation and other suggested options, please see
        # http://svn.modxcms.com/docs/display/MODx096/Friendly+URL+Solutions
        # including for unexpected logouts in multi-server/cloud environments
        # Ariaane note- It seems that exluding the wwww makes no difference to site acccess- still must type in wwww.noname etc to access site...


        Options +FollowSymlinks
        RewriteEngine On
        RewriteBase /

        # Fix Apache internal dummy connections from breaking [(site_url)] cache
        RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
        RewriteRule .* - [F,L]

        # Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin
        #RewriteCond %{HTTP_HOST} .
        #RewriteCond %{HTTP_HOST} !^www.\example\.com [NC]
        #RewriteRule (.*) http://www.example.com/$1 [R=301,L]

        # Exclude /assets and /manager directories from rewrite rules
        RewriteRule ^(manager|assets) - [L]

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

        # Reduce server overhead by enabling output compression if supported.
        php_flag zlib.output_compression On
        php_value zlib.output_compression_level 5

          • 22840
          • 1,572 Posts
          What Modx version are you using ??

          I always leave the prefix empty and the result is as follows:

          Say you homepage is called home and you have the doc alias as home, if the prefix is empty then the url would be www.yoursite.com/home.html

          The above has been the same upto version 1.01 but I dont think it’s been changed in 1.02

          Also how are you calling the pages in the links ??

          If your using index.php?id=12 then it will always be that, you need to have your links as <a href="[~12~]">Home</a> ( that’s if it’s hard coded, if your using wayfinder this will be automatic )

          And lastly make sure you clear the site cache
            • 26183
            • 36 Posts
            I’m using modx 1.0.0

            What I find is that when I click on the page I’m trying to get right on the menu, the suffix for the page I’ve clicked works fine and I get a friendly URL.

            Now, when I am editing the page in MOdx manager and click "preview", the "id=47" appears.

            What I’m getting exactly for my page when I click preview is "http://nonameyet.net16.net/index.php?id=47".

            Under the "resources alias" I am calling the page get-ram. I have also left the prefix entry empty as you advise.

            Is this normal?
              • 22840
              • 1,572 Posts
              Yes, as far as im aware the preview doesn’t use friendly url’s as the .htaccess file for the main site and the manager are different.

              Once viewed in the front end the .htaccess is engaged and the url’s are rendered as friendly url’s

              EDIT:

              Just to add as well, the reason for this is that the search engines cant access the manager or preview so there’s no reason for them to have friendly url’s
                • 26183
                • 36 Posts
                Thank you so much for your help, Paul. Problem solved!!
                  • 22840
                  • 1,572 Posts
                  Glad I could help Sarah
                    • 26183
                    • 36 Posts
                    No, thank you!