Well, sometime back I moved my blog from blogspot to WordPress using WordPress's awesome Importer tool. The action was mainly driven by the desire to host the blog on my own domain since that gives me a lot more flexibility to customize stuff as I want it to be. Luckily for me, my hosting provider (A2hosting) has a ready installation package for setting up a WordPress blog and so that part went pretty smooth. However, once I tried to open up the landing page of my blog, I got page forbidden (403) error. Incidentally, it was coming for every single page of the blog, including the wp-admin.
After a lot of hassle, I was finally able to resolve it and everything seems to be working alright since then. Anyhow, I thought of putting down my observations here for anyone who may face similar issue with their installations or otherwise.
- The obvious things first - I checked the permissions on the installation folder (for me,
- Next I checked the .htaccess in the root and so I found the problem. I had an earlier rails (Ruby on Rails) installation and following lines were present in it: -
RewriteEngine on
RewriteCond %{HTTP_HOST} ^sushain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.sushain.com$
RewriteRule ^contest http://127.0.0.1:12009%{REQUEST_URI} [P,QSA,L]
DirectoryIndex preload.html index.html
# BEGIN WordPress
# END WordPress
I immediately knew that the URL rewriting module was causing some issue here, but I didn't want to tinker with this since I may want my Ruby app (although dormant for now) to come alive again in future. So, what I did instead was that I changed the .htaccess file in the /blog folder from -
DirectoryIndex index.php
AuthUserFile "/home/sushainp/.htpasswds/public_html/blog/passwd"
to -
This overrode the URL rewriting mechanism for /blog level addresses and thus, solved the issue.
By the way, for those of you interested in knowing more about URL-rewriting module, more information is available here.
Cheers !
-- Sushain Pandit Article Source: http://EzineArticles.com/?expert=Sushain_Pandit |
No comments:
Post a Comment