We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42689
    • 125 Posts
    Yes its on subdirectory ..
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Then in your .htaccess file, did you edit the RewriteBase line to show that?

      RewriteBase /subdir
        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
        • 10208 ☆ A M B ☆
        • 1,780 Posts
        Can you also post the full content of your .htaccess file?

        Have you gone though and checked all the server requirements found here? http://rtfm.modx.com/display/revolution20/Server+Requirements

          Frogabog- MODX Websites in Portland Oregon
          "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
          Having server issues? These guys have MODX Hosting perfected - SkyToaster
          • 42689
          • 125 Posts
          Hello sottwell,

          I Have try also
          RewriteBase /subdir
          . but still when i am click on the any page that will show NOT FOUND Error..
          Plz Help smiley

          This is my .htaccess code

          # Friendly URLs Part
          RewriteEngine On
          RewriteBase /subdir
          RewriteCond %{HTTP_HOST} .
          # Force all pages to go to www.domain.com/dir for SEO
          RewriteCond %{HTTP_HOST} !^www\.DOMAINNAME\.com [NC]
          RewriteRule (.*) http://www.DOMAINANME.com/dir/$1 [R=301,L]
          # Friendly URLs
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
          # Additional Settings Follow
          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
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            By /subdir I mean /"whatever-your-installation-subdir-is"

            For example, on my localhost I always have several installations for various purposes. So my .htaccess files will look like this:

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

            Or
            RewriteEngine On
            RewriteBase /templates/
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
            
              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
              • 42689
              • 125 Posts
              Ohh .. i get it ..! now it's working fine smiley

              but tell me one thing.. i have saveral page's or sub page's in my menu bar.. which page's have no parent's .. that page's url link is display like :
              www.demo.com/dir/10.html
              and which page have parent's that page's url link is display like
              www.demo.com/dir/10/


              And one thing more which page's have no parent's that page's working fine,bt which page's have parent's that page's work not fine.. the css of that page is not working smiley


              Help smiley
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                By default, all resources that are parents (containers) will have / added to the alias. All resources that are not parents (containers) will have the proper extension added to the alias. In the case of text/html pages, that will be .html

                Can you give me a URL to one of the bad pages?
                  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
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  You need to add a base tag to your template head - I always put it immediately after the <title>...</title> tag:
                  <base href="[[++site_url]]">
                    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
                    • 42689
                    • 125 Posts
                    Yes now it's working softwell smiley

                    Bt still there are one problem .. let me explain to you ..
                    u can see in my menu ..

                    Which page have child's that url is

                    www.demo.com/dir/5

                    and which page have no child's that url is

                    www.demo.com/dir/4.html

                    How can we fix this .? and how can chnage the page name to page id .. ? Example :-

                    right now its show
                    www.demo.com/dir/5

                    but i want
                    www.demo.com/dir/The-team

                    How can we fix it ..?

                    Thanxx
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      Do you have the "Alias" field filled in for the resources?
                        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