buddhist thought of the day Thought for Mon, 08 Feb 2010

Realization is a matter of becoming conscious of that which is already realized. - Ask the Awakened by Wei Wu Wei...




latest :: Removing index.php in URL

Expression Engine allows a developer to easily remove the index.php portion of the URL in order to create user and SEO friendly URL's. I found while setting up this site that its best to make this decision from the start so that you don't end up with any broken links because you have miscoded something somewhere. Everything was working on my blog section except the single-entry blog pages. Initially I was using comment_url_title_auto_path but the links still all contained index.php. I used the url_title_path varible to get around this on my embeds for the sidebars, but I knew there must be a better way. A little googling and I found that I hadn't correctly setup the paths in the Section Management (i.e. Weblog Management) area. EE uses the values in these fields to generate the urls via the tag library. I removed the index.php from the paths and Viola, my urls worked again. Out of curiosity and because I wanted to reduce my deployment workload, I replaced the domain with the site_url tag to see if that would work; low and behold it works swimmingly. This is a huge time saver on larger sites that have many sections!

0 comments



rss feed