We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1841
    • 141 Posts
    Hi Everyone,
    This has been plaguing me for some time now, I am running revo 1.05 and every so often when I type a url into the address bar /index.php?p= is added before the friendly URL page name.

    Anyone any ideas why this would be happening?

    Running:

    Evo 1.05
    Centos 5.0
    PHP 5.35
    MySql 5.0.77
      • 15083
      • 697 Posts
      Quote from: antsplace at May 06, 2011, 03:22 AM


      Anyone any ideas why this would be happening?


      Sounds like your .htacess file is not configured properly.
      Basically any urls will get re-written to query /index.php?q=alias_name
      But not sure why its coing out in the urls.
      What have you added as your url prefix?
        • 1841
        • 141 Posts
        Hi,
        thanks for the reply, I don’t use a prefix and just a .htm suffix, the htaccess file is the one that comes with modx evo, although I have added lines for 301 redirecting old pages and allow , deny to prevent spammers and a small redirect for gzipping files:
        RewriteCond %{HTTP:Accept-Encoding} gzip
        RewriteCond %{REQUEST_FILENAME}.jgz -f
        RewriteRule (.*)\.js$ $1\.js.jgz [L]
        AddType "text/javascript" .js.jgz
        AddEncoding gzip .jgz
        
        RewriteCond %{HTTP:Accept-Encoding} gzip
        RewriteCond %{REQUEST_FILENAME}.jgz -f
        RewriteRule (.*)\.css$ $1\.css.jgz [L]
        AddType "text/css" .css.jgz
        AddEncoding gzip .jgz



        everything else is standard modx htaccess...
          • 32098
          • 31 Posts
          I had the same problem yesterday (if I have understood correctly), i.e. the attempted 301 redirection just ended up at the homepage but with a long URL in the browser address bar including an unintended q= query.

          After trying lots of things I put the following at the very top of my htaccess file:

          Options +FollowSymLinks
          RewriteEngine on
          RewriteBase /
          RewriteRule ^primer.html$ /free-advanced-english-coursebook.html [R=301,L] 


          That works (on my Revolution setup). People clicking old incoming links for the primer.html page get redirected to the new coursebook page (with friendly URLs on and using the alias to generate the new html file name).

          Hope that works for you too.