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

    First I just want to thank everyone for your help and always responding to my posts. I’m using MODx Revolution and can’t get my friendly URL’s to work exactly as they should. What I’m after:


    • URL’s structured as so: www.mydomain.com/page (not currently what I have: www.mydomain.com/page.html)

    Also, I am using this tag syntax for page link: <a href="[~2~]">The Link</a> it’s not working - it links to the page http://www.mydomain.com/[~2~] instead of www.mydomain.com/about.html

    As instructed I have placed <base href="[[!++site_url]]" /> between my <head> tags and my .htacess file is this:

    AddHandler php5-script .php

    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} .
    RewriteCond %{HTTP_HOST} !^www\.mydomain\.com [NC]
    RewriteRule (.*) http://www.mydomain.com/$1 [R=301,L]
    # Exclude /assets and /manager directories from rewrite rules
    RewriteRule ^(manager|assets) - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
    ExpiresActive On
    ExpiresByType image/gif A2592000
    ExpiresByType image/jpeg A2592000
    ExpiresByType image/png A2592000
    BrowserMatch "MSIE" brokenvary=1
    BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
    BrowserMatch "Opera" !brokenvary
    SetEnvIf brokenvary 1 force-no-vary

    This is one of the last hurdles I’m dealing with and would love to get it figured out. Thanks!
      • 20508
      • 157 Posts
      Oh and here’s a screenshot of my friendly URL configuration.
        • 20508
        • 157 Posts
        Hello, I realized I was not using the updated tag for this, it’s now: [[~Link]] (took me forever to find!)

        So my only remaining issue is - how do I get the URL to be formatted like: www.mydomain.com/link instead of www.mydomain.com/link.html

        Thanks!
          • 20508
          • 157 Posts
          Just figured this out too - changed the HTML content type from .html to blank