3

When I use {{page.link}} or {{page.url}} in a template I am getting

http://mysite.dev/index.php?p=pages/about/history

when what I really want is

http://mysite.dev/pages/about/history

The latter URL works fine on the site, but I'm using the above code to try and create a menu, and don't want the menu item linking to the first URL.

How do I fix this?

3

Documentation for removing index.php

http://buildwithcraft.com/help/remove-index.php

You might have to adjust the .htaccess code depending on your server.

  • Thanks for that. My .htaccess was fine, and the problem was immediately solved by adding 'omitScriptNameInUrls' => true, to the general.php file – Jack McKenzie Aug 21 '14 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.