I’m using the file and directory check method. I didn’t see anything about removing the index.php from permalinks but there was mention of removing it from pagination via the Find and Replace plugin. So, I thought I’d try it on permalinks too.
Here is what I did (and it seems to work):
I left index.php in the “Name of your site’s index page” on the General Config page. This ensures that “My site” and any other links you create in the CP, along with the link to the Expression Engine site work properly.
However, leaving it means that permalinks and pagination will all display the index.php in URLs. The pages will work but they’ll have index.php in them, which defeats the point of removing it in the first place.
So, install the Find and Replace plugin and wrap the following around any entry tags or pagination tags.
{exp:replace find="/index.php"} your permalink and paginate tags {/exp:replace}
This will remove the index.php.
Here is an example in my code. I had permalinks and pagination all in one place so I wrapped the whole thing and it seems to be working fine.
{exp:replace find="/index.php"}{exp:weblog:entries weblog="newsandtips" limit="8" disable="trackbacks"}
<div class="articlepreviewwrapper">
<h2><span>{title}</span></h2>
<p> <h3 class="date">{entry_date format="%F %d, %Y"}</h3><br />
{article_excerpt}<br />
<a href="http://{title_permalink=">Read full article…</a><br />
</div><!-- end articlepreviewwrapper --><br />
{paginate}Page {current_page} of {total_pages} pages {pagination_links}{/paginate}<br />
{/exp:weblog:entries}{/exp:replace}
More trouble than a moose on the interstate but everything works!
Looking forward to 2.0 where removing index.php is supported. Then, hopefully that will be the end of all the hackety hack hacks! 😊