We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20532
    • 14 Posts
    Hi everyone. I just upgraded from Evo to Revo 2.1.2 on a LAMP stack, but I’m having an issue that was easily solved in Evo.

    I’d like to remove the suffix from file names in the url.

    Currently my urls look like this:
    http://myDomain.com/container/resource.html

    But, I’d like this:
    http://myDomain.com/container/resource/

    Here’s the current rules from the htaccess file

    
    # Exclude /assets and /manager directories and images from rewrite rules
    RewriteRule ^(manager|assets)/*$ - [L]
    RewriteRule \.(jpg|jpeg|png|gif|ico)$ - [L]
    
    # For Friendly URLs
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
    
    


    Any clues?


    • In MODX Revolution, file extensions are defined per Content Type. You can edit the HTML Content Type to have an empty extension. Also note, Resources that are marked as a Container, and have a text/html mime-type, will get the container_suffix System Setting, which defaults to / and is defined in System Settings.
        • 20532
        • 14 Posts
        Works like a charm. Thanks Jason!
          • 26503
          • 620 Posts
          This is not working for me - I go to system->content types & remove the .html from the html content type & the manager will not accept the change, I just get the little red error marker & if I refresh the page the .html extension is back... ?
            *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

            Sean Kimball CLP, CLS.
            Technical Director / Sr. Developer | BigBlock Studios
            ._______________________________________________.
            Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
            27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
            phone/fax: 905-426-5525
          • Quote from: sean69 at Jan 27, 2013, 10:32 PM
            This is not working for me - I go to system->content types & remove the .html from the html content type & the manager will not accept the change, I just get the little red error marker & if I refresh the page the .html extension is back... ?
            The red marker is indicating you made a change to the grid which has not been saved. ??
            • Indeed. That's a "dirty" marker, not an error marker. You need to either click just outside of the input field or hit "enter" to save the new value.
                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