We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15029
    • 35 Posts
    Hi,
    I followed the very good guide on Wiki about URL rewrite.
    I have set everything as mentioned and when I load the page, I get the proper rewrite:
    http://www.domain.com/modx/en/services.html
    However, this is giving me a 404.
    What should be done still so that it is interpreted?
    Thanks,
    Julien
      • 15029
      • 35 Posts
      I have checked phpinfo and it appears under apache2handler section in the modules uploaded.

      My .htaccess looks like this:
      RewriteEngine On
      RewriteBase /
      
      # Fix Apache internal dummy connections from breaking [(site_url)] cache
      RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
      RewriteRule .* - [F,L]
      
      RewriteCond %{HTTP_HOST} .
      RewriteCond %{HTTP_HOST} !^www\.spiceltd\.net [NC]
      RewriteRule (.*) http://www.spiceltd.net/modx/$1 [R=301,L]
      
      # The Friendly URLs part
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
      


      My installation is in the modx directory in the domain root, so I added that in the URL rewrite rule.

      My site config reads
      Use friendly URLs: Yes
      Prefix for friendly URLs:
      Suffix for friendly URLs: .html
      Use friendly aliases: Yes
      Use friendly alias path: Yes
      Allow duplicate aliases: Yes
      Automatically generate alias: Yes
        • 36592
        • 970 Posts
        Quote from: JulienT at Apr 21, 2009, 12:06 PM

        RewriteBase /
        I guess you have installed modx in the "modx" directory.
        If so, your RewriteBase should be...
        RewriteBase /modx/
          • 15029
          • 35 Posts
          yes, i had to put the subfolder in there too.
          Now it’s working.
          Thanks.