The ‘Almost Pretty’ Permalink
Now, a warning first, this is going to be a RANT.
Nothing about blogging had given me quite as much trouble as the quest for the ‘almost pretty’ permalink. Do note, it’s not even the ‘prettiest’, and it took me hours to solve. I think it is as hard as trying to export my blog data from msn live spaces!
Initially, it was deceptively easy to change, just click that nice radio button that says custom permalink and put in your own structure. On clicking apply, I tested it out and all was well… until i tried to navigate to the next page!
To my horror, it lead me to a 404 file… “Sorry, but you are looking for something that isn’t here.”
*faints*
The url pointed to “http://caffeinedoll.daviontsuqi.com/index.php/Index.php/page/2/” >>> notice the repeated index.php in the link? Oh great, i just need to take one out! But from where?
After a lot of mucking around, this website gave me a clue.
Find esc_url() function in wp-includes/formatting.php
Add the line below at the beginning of the function just before any “if” statements:
$url = str_replace(‘index.php/Index.php’,'index.php’,$url);
and remember to do it with each new upgrade.
*dammit*