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?

1 Answer 1

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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