Netfirms Wordpress and Pretty URLs (Date and Name)
Update: Great news. The Wordpress pretty URLs problem has been fixed by the guys at Netfirms. One of the employees from Netfirms has posted a comment that they have fixed the issue and one of my friends who is on Netfirms confirmed it. Good job guys.
I have been with Netfirms for the past 7 months and i never had a problem with them, but last week i upgraded my Wordpress to 2.1.2 and now my blog is broken, any link on my blog brings me back to the homepage which is really frustating becasue even the comment link doenst work. I started searching for possible solutions when i found too many frustated Netfrims users complaining about the problem and many others suggesting fixes and then they reply back with no success.
The problem as some say is Netfrims has not enabled the Allow Override option for .htaccess rules to be considered so adding a /index.php before the Date and Name structure does the job, even the Netfirms support page says that you should use this
/index.php/%year%/%monthnum%/%day%/%postname%/
instead of the regular
/%year%/%monthnum%/%day%/%postname%/
for Date and Name permalink structure. So what you get won’t be exactly the date and name structure but with an extra index.php.
The problem with this is every post and every page and worse every category (every internal link to be exact) on your blog will have the index.php string added in the URL. It would be like http://mydomain.com/blog/index.php/about instead of the pretty http://mydomain.com/blog/about For me the situation was worse, Date and Name structure worked for me earlier but now it doesnt so all backlinks i got for individual posts now redirect to the homepage so the visitor doesnot see what he was expecting to see.
I went through a few Wordpress support topics, some of them very old to be considered as useful anymore. I even found a frustated Netfirms user who went as far as switching to another provider, ofcourse Permalinks was not the only reason for the switch but it was one of the main reasons. She really took off her anger by writing a lot about how bad netfrims was. That was just one persons case but most of us are having a good time with Netfrims arent we?
Now getting to what i have done to get my Date and Name permalinks back, i tried the workaround provided by Joel, who is another frustated Netfrims-Wordpress user. And the result is it didnt work. But i suggest you go try Joel’s workaround and the comments, he is really quick in giving you any kind of feedback if you tried his method to fix your permalinks.
I tried a part of what Joel did and it worked. Here is exactly what i did
Changed the permission for .htaccess file in my wordpress directory or the blog directory to 666 and then applied the Date and Name permalink structure through the Admin panel and then edited my .htaccess to this
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !index.php
RewriteRule (.*) index.php/$1 [L]
</IfModule>
# END WordPress
where blog is the directory in which i installed wordpress and finally changed the permission of .htaccess file to 444.
Some more Wordpress specific rules i leant during this operation are
- What ever may be the permalink structure you use, .htaccess content doenot change
- Prepending /index.php to your structure should work irrespective of the contenets of .htaccess
- Change your .htaccess after you apply a new permalink structure because when ever you choose a new structure, wordpress replaces the #WordPress section of the .htaccess file with the default content which is
# BEGIN WordPress<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php
</IfModule>
# END WordPress
- Incase you edit the Wordpress part of the .htaccess file, you should lock it down with 444 permission so that wordpress doesnot replace it with the default contents. (Thanks Joel)
Now finally what exactly my settings look like
Permalink structure set to Date and Name
/%year%/%monthnum%/%day%/%postname%/
Contenets of .htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !index.php
RewriteRule (.*) index.php/$1 [L]
</IfModule>
# END WordPress
PHP 4
Wordpress 2.1.2
.htaccess Enabled in NetFirms Control Panel
9 Comments