Skip to content


Fixing a broken .htaccess for drupal

The Drupal site at tekipad.com broke its clean url functionality and every attempt to access similar to tekipad.com/node/33 began redirecting to tekipad/blog ’s 404 error page. tekipad.com/?q=admin links worked fine though.
On accessing the root directory of the site via ftp and downloading .htaccess, the error seemed obvious. The following lines needed to be added.
As an introduction, the site is organized as follows:
/ is the root directory of tekipad.com which runs drupal
while the wordpress blog is installed at /blog

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/(.*)$
RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]

You may need to be careful of the following parts in the last two lines:
1) ^/(.*)$
if your site is to be accessed as a subdirectory of your site, the part has to be modified to ^/subdir/(.*)$
2) /index.php?q=$1
this has to be /subdir/in1dex.php?q=$1

Was a basic mistake but took a couple of hours to find and fix it. I was assuming the problem was in the drupal database.

Man Pages:

Posted in Troubleshooting.

Tagged with , , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.