Title: Resolving 403 Forbidden Page Error For WordPress Blogs
Author: Sushain Pandit



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, /blog) and found it to be perfectly ok (755 for read / execute to world).

- 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 -

DirectoryIndex index.php

AuthUserFile "/home/sushainp/.htpasswds/public_html/blog/passwd"

# BEGIN WordPress

RewriteEngine On

RewriteBase /blog/

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /blog/index.php [L]

# END WordPress

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
http://sushain.com


 


Join our list
First Name
Last Name
Email Address
Subscribe:
Unsubscribe:
Current Ezine
Your Solo Links
Free Java Scripts
100 free Visitors
Submit URLs

FREE Work At Home GUIDE for our visitors!

Ad Services
Solo Ad Packs

Affiliate Income
Unlimited income Pool
Maximum profits



Cash Flow
Investors Real Estate Cash Flow System
Wealth Building System
Premier Home Business

Business Plan: A must have

Free Stuff
Build Adsense Empire FREE!

 
©2009-2010 Island Ezine. All rights reserved.

Site design by
Paradigm Web Design