We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36747
    • 138 Posts
    I want to use friendly url!!!

    I know that mod_rewrite is loaded in the server.

    This is my .htaccess file:
    #
    # URL rewriting for Etomite CMS
    # Copyright AAB '04
    #
    # To use friendly URLs for Etomite you need to uncomment the three Rewrite directives
    # Make sure RewriteBase points to the directory where you installed Etomite
    # 
    #
    
    php_flag zlib.output_compression On
    php_value zlib.output_compression_level 5
    
    RewriteEngine On
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    
    # if Etomite is installed in a subdirectory, change the following line so the path
    # to the "root" of the site can be found, appropriately as follows:
    # RewriteRule ^(.*)$ /path/to/subdirectory/index.php?q=$1 [L,QSA]
    
    RewriteRule ^(.*)$ /cms/index.php?q=$1 [L,QSA]
    
    
    # The following lines address IE 6 browser caching bugs 
    # for advanced CSS techniques.
    
    ExpiresActive On
    ExpiresByType image/gif A2592000
    ExpiresByType image/jpeg A2592000
    ExpiresByType image/png A2592000
    
    # This stops the horrible screen flicker in IE
    BrowserMatch "MSIE" brokenvary=1
    BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
    BrowserMatch "Opera" !brokenvary
    SetEnvIf brokenvary 1 force-no-vary


    My url is http://sabf.itba.edu.ar/cms. I tried millions times changing the path, but it's not working. Could someone help me with this?

    Thanks in advance.
      patagonia, argentina
      • 34162
      • 1 Posts
      Have you tried removing the
      php_flag zlib.output_compression On
      php_value zlib.output_compression_level 5 
      ?
        • 36747
        • 138 Posts
        yes... sad

        I also try with /var/www/htdocs/sabf/publich_html/cms/index.php?blabla and every posible combination of the path!!!

        I want friendly urls!!!
          patagonia, argentina
          • 22303 MODX Staff
          • 10,725 Posts
          First, which .htaccess is this in? In your root web directory, or under /cms/? If you want to use this in a subdirectory, I think you can simply have this in an .htaccess file under your /cms/ directory (you don't need any rewrite related commands in your root .htaccess):
          RewriteEngine On
          RewriteBase /cms/
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

          Let me know if that doesn't work for ya. You will never want to reference anything below the web server document root; all Rewrite commands are limited to resources within the document root.
            • 36747
            • 138 Posts
            The .htaccess file is in the /cms/ directory.

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


            But it's not working..
              patagonia, argentina
              • 22303 MODX Staff
              • 10,725 Posts
              If you can send me a URL to look at for this, I might be able to figure out what is happening. What kind of response are you getting?
                • 25663 MODX Staff
                • 12,272 Posts
                Emi,

                If you're getting a site that renders without CSS/images, you might want to change everything to absolute references and put a base href="/cms/" in your headers of your templates. That might help.

                Or is it giving you a total meltdown?
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • 36747
                  • 138 Posts
                  tarararara hey! tararara hey! i don't know what you are talking about ryan!

                  @ Opengeek the url is http://sabf.itba.edu.ar/cms/ the problem is that I'm showing the site to some people, and as friendly urls dont work the can't visit. That's why at the moment friendly url are off. If you want add me to your msn list and we could chat there.
                    patagonia, argentina
                    • 36747
                    • 138 Posts
                    guys, sorry for bumping this but i cannot found a solution!

                    I checked http://modxcms.com/forums/index.php/topic,3493.msg25805.html#msg25805 and it works great. But when in .htaccess I putt [tt]RewriteEngine On[/tt] i get an 403 error.

                    My phpinfo is http://sabf.itba.edu.ar/try.php and mod_rewrite appears as loaded.

                    My .htaccess is the following:

                    # MODx supports friendly URLs via this .htaccess file. In order to use it, you must change the 
                    # file name from ht.access to .htaccess. If you don't want to use friendly URLs, you can comment 
                    # the three Rewrite directives out with pound signs (like the beginning of this line).
                    #
                    # Make sure RewriteBase points to the directory where you installed MODx.
                    # E.g., "/" if your installation is in your root web documents directory (it comes this way by 
                    # default) or "/MODx" if your installation is in a MODx subdirectory, per the comments below. You
                    # must serve web pages via Apache with mod_rewrite to be able to use this functionality.
                    #
                    # The last two blocks of rules at the bottom of this .htaccess file address anamolies with IE 
                    # for Windows PCs and the way in which it caches images, which causes a distracting flicker in 
                    # background images when links are hovered on the page.
                    #
                    # The output compression directives immediately below serve to speed up delivery of web pages, 
                    # and may also be optionally commented out.
                    
                    php_flag zlib.output_compression On
                    php_value zlib.output_compression_level 5
                    
                    # Rewrite directives here for SEF (Search Engine Friendly) URLs
                    
                    RewriteEngine On
                    RewriteBase /
                    
                    RewriteCond %{REQUEST_FILENAME} !-f
                    RewriteCond %{REQUEST_FILENAME} !-d
                    
                    # If your MODx installation is in a subdirectory, change the following line to match the physical
                    # path to the "root" of the site as follows:
                    # RewriteRule ^(.*)$ /path/to/subdirectory/index.php?q=$1 [L,QSA]
                    
                    RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]
                    
                    # This following two sections stops screen flicker in IE on rollovers (Bad IE Win, Bad!).
                    # Comment these sections out if you do not need them. They can result in having to force reload
                    # pages when developing sites and changing images frequently to see your changes. 
                    
                    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


                    Could somebody help me? I have this site online and I want to use the SEO feature of MODx!

                    thanks in advance
                    eemi
                      patagonia, argentina
                      • 33337
                      • 3,975 Posts
                      Your site is in subdirectory from root folder,

                      use this:

                      # If your MODx installation is in a subdirectory, change the following line to match the physical
                      # path to the "root" of the site as follows:
                      # RewriteRule ^(.*)$ /path/to/subdirectory/index.php?q=$1 [L,QSA]
                      
                      RewriteRule ^(.*)$ /cms/index.php?q=$1 [L,QSA]
                      
                        Zaigham R - MODX Professional | Skype | Email | Twitter

                        Digging the interwebs for #MODX gems and bringing it to you. modx.link